Esempio n. 1
0
 public NodePage SetPageName(FieldPageName PageName)
 {
     if (PageName == null)
     {
         throw new ArgumentNullException(m_PageNameName);
     }
     return(new NodePage(this.SetField(new FieldIdentifier(m_PageNameName), PageName), ChildCollection));
 }
Esempio n. 2
0
        public static NodePage BuildWith(FieldPageName PageName)
        {
            //build fields
            Dictionary <FieldIdentifier, FieldBase> mutableFields =
                new Dictionary <FieldIdentifier, FieldBase>();

            mutableFields.Add(new FieldIdentifier(m_PageIdName), new FieldGuid()); // created and never changes
            mutableFields.Add(new FieldIdentifier(m_PageNameName), PageName);
            mutableFields.Add(new FieldIdentifier(m_CommentName), new FieldString());
            //Add Fields here: mutableFields.Add(new FieldIdentifier(m_CodeName), Code);

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

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

            return(Builder);
        }