Ejemplo n.º 1
0
        public static void Initialize(int sortCodeLength,
                                      string generalSortCodePrefix, string branchSortCodePrefix)
        {
            SeqCodeUnit.Initialize(sortCodeLength, generalSortCodePrefix,
                                   branchSortCodePrefix);

            root = new SequenceCode(BRANCHSORTFIRSTPREFIX.Repeat(branchSortCodePrefix.Length), null, true);

            root.Description = "Root";
        }
Ejemplo n.º 2
0
        public SequenceCode(string sortCode,
                            SequenceCode parent = null,
                            bool isBranch       = false)
        {
            if (parent != null)
            {
                if (parent.IsBranch)
                {
                    Parent = parent ?? root;
                }
                else
                {
                    throw new ArgumentException();
                }
            }

            me = (new SeqCodeUnit(sortCode, isBranch));
        }