Table of Contents

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 ReaderValue
path 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 ReaderValue
path 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 ReaderValue
path IEnumerable<string>
min int
max 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

int

Current

Returns the current item in the list.

public ReaderValue Current { get; }

Property Value

ReaderValue

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

bool

Index

Returns the current index of the item in the list.

public int Index { get; }

Property Value

int

Path

Returns the current path of the item in the list.

public IEnumerable<string> Path { get; }

Property Value

IEnumerable<string>

PeekNext

Returns the next item in the list if it exists or null, without advancing the index.

public ReaderValue? PeekNext { get; }

Property Value

ReaderValue

Underlying

Returns the underlying ReaderList.

public ReaderList Underlying { get; }

Property Value

ReaderList

Methods

Next()

Advance to the next index.

public void Next()