Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NavigableNavigator"/> class with a content source,
 /// and an optional root content.
 /// </summary>
 /// <param name="source">The content source.</param>
 /// <param name="content">The root content.</param>
 /// <remarks>When no root content is supplied then the root of the source is used.</remarks>
 public NavigableNavigator(INavigableSource source, INavigableContent content = null)
     : this(source)
 {
     _nameTable = new NameTable();
     _lastAttributeIndex = source.LastAttributeIndex;
     _state = new State(content ?? source.Root, null, null, 0, StatePosition.Root);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NavigableNavigator"/> class with a content source,
 /// and an optional root content.
 /// </summary>
 /// <param name="source">The content source.</param>
 /// <param name="content">The root content.</param>
 /// <remarks>When no root content is supplied then the root of the source is used.</remarks>
 public NavigableNavigator(INavigableSource source, INavigableContent content = null)
     : this(source)
 {
     _nameTable          = new NameTable();
     _lastAttributeIndex = source.LastAttributeIndex;
     _state = new State(content ?? source.Root, null, null, 0, StatePosition.Root);
 }
 // initialize a new state
 // used for creating the very first state
 // and also when moving to a child element
 public State(INavigableContent content, State parent, IList <int> siblings, int siblingIndex, StatePosition position)
     : this(position)
 {
     Content      = content;
     Parent       = parent;
     Siblings     = siblings;
     SiblingIndex = siblingIndex;
 }
Пример #4
0
 // initialize a new state
 // used for creating the very first state
 // and also when moving to a child element
 public State(INavigableContent content, State parent, IList<int> siblings, int siblingIndex, StatePosition position)
     : this(position)
 {
     Content = content;
     Parent = parent;
     Siblings = siblings;
     SiblingIndex = siblingIndex;
 }