source: trunk/CrypPlugins/KeySearcher/P2P/Tree/NodeFactory.cs @ 1674

Last change on this file since 1674 was 1674, checked in by Paul Lelgemann, 12 years ago

o Refactored distributed KeySearcher: updated directory structure and variable names

File size: 877 bytes
Line 
1using System.Numerics;
2using KeySearcher.Helper;
3using KeySearcher.P2P.Storage;
4
5namespace KeySearcher.P2P.Tree
6{
7    internal static class NodeFactory
8    {
9        public static NodeBase CreateNode(StorageHelper storageHelper, KeyQualityHelper keyQualityHelper,
10                                          Node parentNode, BigInteger from, BigInteger to,
11                                          string distributedJobIdentifier)
12        {
13            NodeBase newNode;
14
15            if (from == to)
16            {
17                newNode = new Leaf(storageHelper, keyQualityHelper, parentNode, from, distributedJobIdentifier);
18            }
19            else
20            {
21                newNode = new Node(storageHelper, keyQualityHelper, parentNode, from, to, distributedJobIdentifier);
22            }
23
24            return newNode;
25        }
26    }
27}
Note: See TracBrowser for help on using the repository browser.