private SimpleOrderSet(SimpleOrderSet set, string groupName, string name, INakedObjectMemberPeer[] members) : base(groupName) { parent = set; parent.AddElement(this); this.members = members; Add(name); }
public static SimpleOrderSet CreateOrderSet(string order, INakedObjectMemberPeer[] members) { var set = new SimpleOrderSet(members); string[] st = order.Split(new[] {','}); foreach (string element in st) { string tempStr = element.Trim(); bool ends = tempStr.EndsWith(")"); if (ends) { tempStr = tempStr.Substring(0, tempStr.Length - 1).Trim(); } if (tempStr.StartsWith("(")) { int colon = tempStr.IndexOf(':'); string groupName = tempStr.Substring(1, colon).Trim(); tempStr = tempStr.Substring(colon + 1).Trim(); set = set.CreateSubOrderSet(groupName, tempStr); } else { set.Add(tempStr); } if (ends) { set = set.parent; } } set.AddAnyRemainingMember(); return set; }
private SimpleOrderSet(INakedObjectMemberPeer[] members) : base("") { this.members = members; parent = null; }