Struct IndexWise
- Namespace
- Mech3DotNet.Reader
- Assembly
- Mech3DotNet.dll
Enumerate all ReaderValue in a ReaderList.
public struct IndexWise
- Inherited Members
Constructors
IndexWise(ReaderValue, IEnumerable<string>)
Create a new index-wise iteration over the specified ReaderValue with an existing query path.
public IndexWise(ReaderValue value, IEnumerable<string> path)
Parameters
value
ReaderValuepath
IEnumerable<string>
Exceptions
- ConversionException
Thrown if the ReaderValue is not a ReaderList.
IndexWise(ReaderValue, IEnumerable<string>, int)
Create a new index-wise iteration over the specified ReaderValue with an existing query path.
public IndexWise(ReaderValue value, IEnumerable<string> path, int count)
Parameters
value
ReaderValuepath
IEnumerable<string>count
int
Exceptions
- ConversionException
Thrown if the ReaderValue is not a ReaderList, or the list has fewer or more items than the expected count.
IndexWise(ReaderValue, IEnumerable<string>, int, int)
Create a new index-wise iteration over the specified ReaderValue with an existing query path.
public IndexWise(ReaderValue value, IEnumerable<string> path, int min, int max)
Parameters
value
ReaderValuepath
IEnumerable<string>min
intmax
int
Exceptions
- ConversionException
Thrown if the ReaderValue is not a ReaderList, or the list has fewer items than the expected minimum, or the list has more items than the expected maximum.
Properties
Count
Returns the count of items in the list.
public int Count { get; }
Property Value
Current
Returns the current item in the list.
public ReaderValue Current { get; }
Property Value
Exceptions
- IndexOutOfRangeException
Thrown if the index has been advanced past the end of the list.
HasItems
Returns true if there are remaining items in the list.
public bool HasItems { get; }
Property Value
Index
Returns the current index of the item in the list.
public int Index { get; }
Property Value
Path
Returns the current path of the item in the list.
public IEnumerable<string> Path { get; }
Property Value
PeekNext
Returns the next item in the list if it exists or null, without advancing the index.
public ReaderValue? PeekNext { get; }
Property Value
Underlying
Returns the underlying ReaderList.
public ReaderList Underlying { get; }
Property Value
Methods
Next()
Advance to the next index.
public void Next()