public CodeGenerationParameter Parent(Label label) { if (!HasParent()) { throw new NotSupportedException("Orphan parameter"); } CodeGenerationParameter matchedParent = _parent; while (matchedParent != null) { if (matchedParent.IsLabeled(this.label)) { return(matchedParent); } matchedParent = matchedParent.Parent(); } throw new NotSupportedException("Orphan parameter"); }
private void OwnedBy(CodeGenerationParameter parent) => _parent = parent;
public static CodeGenerationParameters From(Label label, string value) { return(From(CodeGenerationParameter.Of(label, value))); }