Esempio n. 1
0
 public ElementBase(NavigatorContext context, Content content, string name, ElementBase parent)
 {
     Name    = name;
     Parent  = parent;
     Context = context;
     Content = content;
 }
Esempio n. 2
0
        public FieldsElement(NavigatorContext context, Content content, ElementBase parent)
            : base(context, content, "Fields", parent)
        {
            var enumerator = content.Fields.Values.AsEnumerable <Field>().GetEnumerator();

            FieldEnumerator = new FieldEnumerator(enumerator);
            _isEmpty        = !FieldEnumerator.MoveNext();
        }
Esempio n. 3
0
        public ContentNavigator(Content content, bool withChildren)
        {
            var context = new NavigatorContext();

            context.MainContent  = content;
            context.WithChildren = withChildren;
            _currentElement      = new RootElement(context, content);
        }
Esempio n. 4
0
        public ItemContainerElement(NavigatorContext context, Content content, string name, ElementBase parent, Field field)
            : base(context, content, name, parent, field)
        {
            var listField = (IXmlChildList)field;

            ChildItemName        = listField.GetXmlChildName();
            ChildValueEnumerator = listField.GetXmlChildValues().GetEnumerator();
            _isEmpty             = !ChildValueEnumerator.MoveNext();
        }
Esempio n. 5
0
 protected FieldElement(NavigatorContext context, Content content, string name, ElementBase parent, Field field)
     : base(context, content, name, parent)
 {
     this.Field          = field;
     _attributeContainer = field as IXmlAttributeOwner;
     _isListField        = field.Name[0] == '#';
     if (_isListField)
     {
         base.RemoveHashSignFromName();
     }
 }
Esempio n. 6
0
 internal static FieldElement Create(NavigatorContext context, Content content, ElementBase parent, Field field)
 {
     if (field is IXmlChildList)
     {
         return(new ItemContainerElement(context, content, field.Name, parent, field));
     }
     if (field is IRawXmlContainer)
     {
         return(new XmlFieldElement(context, content, field.Name, parent, field));
     }
     return(new SimpleFieldElement(context, content, field.Name, parent, field));
 }
Esempio n. 7
0
 public XmlNodeWrapper(NavigatorContext context, Content content, string name, ElementBase parent, XmlNode wrappedNode)
     : base(context, content, name, parent)
 {
     _wrappedNode = wrappedNode;
 }
Esempio n. 8
0
 internal static ActionElement Create(NavigatorContext context, Content content, ElementBase parent, ActionBase action)
 {
     return(new ActionElement(context, content, action.Name, parent, action));
 }
Esempio n. 9
0
 private ActionElement(NavigatorContext context, Content content, string name, ElementBase parent, ActionBase action)
     : base(context, content, name, parent)
 {
     _action = action;
 }
Esempio n. 10
0
 public ActionsElement(NavigatorContext context, Content content, ElementBase parent)
     : base(context, content, "Actions", parent)
 {
     ActionEnumerator = ActionFramework.GetActionsForContentNavigator(content).GetEnumerator();
     _isEmpty         = !ActionEnumerator.MoveNext();
 }
Esempio n. 11
0
 public ChildItemElement(NavigatorContext context, Content content, ElementBase parent, string name, string value)
     : base(context, content, name, parent)
 {
     _value = value;
 }
Esempio n. 12
0
 public RootElement(NavigatorContext context, Content content) : base(context, content, "#document", null)
 {
     context.SetRoot(this);
 }
Esempio n. 13
0
 public ChildrenElement(NavigatorContext context, Content content, ElementBase parent) : base(context, content, "Children", parent)
 {
 }
Esempio n. 14
0
 internal static XmlNodeWrapper Create(NavigatorContext context, Content content, string name, ElementBase parent, XmlNode wrappedNode)
 {
     return(new XmlNodeWrapper(context, content, name, parent, wrappedNode));
 }
Esempio n. 15
0
 public ContentHeadElement(NavigatorContext context, Content content, string name, ElementBase parent) : base(context, content, name, parent)
 {
 }
Esempio n. 16
0
 public TextElement(NavigatorContext context, Content content, ElementBase parent, string textValue)
     : base(context, content, "#text", parent)
 {
     _textValue = textValue;
 }
Esempio n. 17
0
 public ContentElement(NavigatorContext context, Content content, ElementBase parent, bool isChildContent, int contentIndex)
     : base(context, content, "Content", parent)
 {
     IsChildContent = isChildContent;
     ContentIndex   = contentIndex;
 }
Esempio n. 18
0
 public XmlFieldElement(NavigatorContext context, Content content, string name, ElementBase parent, Field field) : base(context, content, name, parent, field)
 {
 }
Esempio n. 19
0
 public ContentNavigator(Content content, bool withChildren)
 {
     var context = new NavigatorContext();
     context.MainContent = content;
     context.WithChildren = withChildren;
     _currentElement = new RootElement(context, content);
 }