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"; }
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)); }