예제 #1
0
 public NodeSolution SetSolutionName(FieldSolutionName SolutionName)
 {
     if (SolutionName == null)
     {
         throw new ArgumentNullException(m_SolutionNameName);
     }
     return(new NodeSolution(this.SetField(new FieldIdentifier(m_SolutionNameName), SolutionName), ChildCollection));
 }
예제 #2
0
        public override void HeaderEditAccept()
        {
            base.HeaderEditAccept();
            bool accepted = FieldSolutionName.CheckSyntax(HeaderEdit);

            if (accepted)
            {
                Solution = Solution.SetSolutionName(new FieldSolutionName(HeaderEdit));
            }
            else
            {
                HeaderEdit = Solution.SolutionName.ToString();
            }
        }
예제 #3
0
        public static NodeSolution BuildWith(FieldSolutionName SolutionName, FieldLayout Layout)
        {
            //build fields
            Dictionary <FieldIdentifier, FieldBase> mutableFields =
                new Dictionary <FieldIdentifier, FieldBase>();

            mutableFields.Add(new FieldIdentifier(m_SolutionNameName), SolutionName);
            mutableFields.Add(new FieldIdentifier(m_LayoutName), Layout);

            //build children
            KeyedNodeCollection <NodeBase> mutableChildren =
                new KeyedNodeCollection <NodeBase>();
            //Add Children here: mutableChildren.Add(SomeChild);

            //build node
            NodeSolution Builder = new NodeSolution(
                new ReadOnlyDictionary <FieldIdentifier, FieldBase>(mutableFields),
                new ReadOnlyCollection <NodeBase>(mutableChildren));

            return(Builder);
        }
예제 #4
0
        public static NodeSolution BuildWith(FieldSolutionName SolutionName, FieldLayout Layout)
        {
            //build fields
            Dictionary<FieldIdentifier, FieldBase> mutableFields =
                new Dictionary<FieldIdentifier, FieldBase>();
            mutableFields.Add(new FieldIdentifier(m_SolutionNameName), SolutionName);
            mutableFields.Add(new FieldIdentifier(m_LayoutName), Layout);

            //build children
            KeyedNodeCollection<NodeBase> mutableChildren =
                new KeyedNodeCollection<NodeBase>();
            //Add Children here: mutableChildren.Add(SomeChild);

            //build node
            NodeSolution Builder = new NodeSolution(
                new ReadOnlyDictionary<FieldIdentifier, FieldBase>(mutableFields),
                new ReadOnlyCollection<NodeBase>(mutableChildren));

            return Builder;
        }
예제 #5
0
 public NodeSolution SetSolutionName(FieldSolutionName SolutionName)
 {
     if (SolutionName == null)
     {
         throw new ArgumentNullException(m_SolutionNameName);
     }
     return new NodeSolution(this.SetField(new FieldIdentifier(m_SolutionNameName), SolutionName), ChildCollection);
 }