public Property(string localName, Wrapper parent) { if (!LocalNameRegex.IsMatch(localName)) { throw new ArgumentException($"Element can't be named '{localName}'"); } Parent = parent; LocalName = localName; }
public Wrapper(string localName, Wrapper parent = null) { if (!LocalNameRegex.IsMatch(localName)) { throw new ArgumentException($"Element can't be named '{localName}'"); } Parent = parent; LocalName = localName; Elements = new List <IElement>(); }