Struct Query
- Namespace
- Mech3DotNet.Reader
- Assembly
- Mech3DotNet.dll
Allows applying multiple IQueryOperation to a ReaderValue, while tracking the path of the queries through the data.
public struct Query
- Inherited Members
Properties
Value
public ReaderValue Value { get; }
Property Value
Methods
Array<T>(IConvertOperation<T>)
Convenience method to create a ToArray<T>IConvertOperation<T> based on the specified inner IConvertOperation<T>.
public static ToArray<T> Array<T>(IConvertOperation<T> op)
Parameters
op
IConvertOperation<T>
Returns
- ToArray<T>
Type Parameters
T
Bool()
Convenience method to create a ToBoolIConvertOperation<T>.
public static ToBool Bool()
Returns
Dict<T>(IConvertOperation<T>)
Convenience method to create a ToDict<T>IConvertOperation<T> based on the specified inner IConvertOperation<T>.
public static ToDict<T> Dict<T>(IConvertOperation<T> op)
Parameters
op
IConvertOperation<T>
Returns
- ToDict<T>
Type Parameters
T
Float()
Convenience method to create a ToFloatIConvertOperation<T>.
public static ToFloat Float()
Returns
Int()
Convenience method to create a ToIntIConvertOperation<T>.
public static ToInt Int()
Returns
KeyValue<T>(IConvertOperation<T>)
Convenience method to create a ToKeyValue<T>IConvertOperation<T> based on the specified inner IConvertOperation<T>.
public static ToKeyValue<T> KeyValue<T>(IConvertOperation<T> op)
Parameters
op
IConvertOperation<T>
Returns
- ToKeyValue<T>
Type Parameters
T
List<T>(IConvertOperation<T>)
Convenience method to create a ToList<T>IConvertOperation<T> based on the specified inner IConvertOperation<T>.
public static ToList<T> List<T>(IConvertOperation<T> op)
Parameters
op
IConvertOperation<T>
Returns
- ToList<T>
Type Parameters
T
Number()
Convenience method to create a ToNumberIConvertOperation<T>.
public static ToNumber Number()
Returns
Only()
Convenience method to create a FindOnlyIQueryOperation.
public static FindOnly Only()
Returns
Only(string)
Convenience method to create a FindByKey based on the specified key, followed immediately by a FindOnlyIQueryOperation.
public static Combinator Only(string key)
Parameters
key
string
Returns
Root(ReaderValue)
Create a new Query with the specified ReaderValue as the root.
Because root values in reader ZBD data are usually a list with a single item (it isn't known why), currently this immediately applies a FindOnlyIQueryOperation. However, this may change in future.
public static Query Root(ReaderValue value)
Parameters
value
ReaderValue
Returns
String()
Convenience method to create a ToStrIConvertOperation<T>.
public static ToStr String()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator /(Query, IQueryOperation)
Apply the IQueryOperation to the current value.
public static Query operator /(Query query, IQueryOperation op)
Parameters
query
Queryop
IQueryOperation
Returns
operator /(Query, int)
Apply a FindByIndexIQueryOperation based on the specified index to the current value.
public static Query operator /(Query query, int index)
Parameters
Returns
operator /(Query, string)
Apply a FindByKeyIQueryOperation based on the specified key to the current value.
public static Query operator /(Query query, string key)