コード例 #1
0
        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");
        }
コード例 #2
0
 public static CodeGenerationParameters From(Label label, string value)
 {
     return(From(CodeGenerationParameter.Of(label, value)));
 }
コード例 #3
0
 private void OwnedBy(CodeGenerationParameter parent) => _parent = parent;