Class Type<T>.Indexer<TIndicies, TValue>
Provides access to indexer property declared in type T
.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Indexer<TIndicies, TValue>
where TIndicies : struct
Type Parameters
Name | Description |
---|---|
TIndicies | A structure representing parameters of indexer. |
TValue | Property value. |
Methods
| Improve this Doc View SourceGet(String, Boolean)
Reflects instance indexer property.
Declaration
public static Indexer<T, TIndicies, TValue> Get(string propertyName = "Item", bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the indexer property. |
Boolean | nonPublic | true to reflect non-public property. |
Returns
Type | Description |
---|---|
Indexer<T, TIndicies, TValue> | The reflected property; or null, if property doesn't exist. |
GetStatic(String, Boolean)
Reflects static indexer property.
Declaration
public static Indexer<TIndicies, TValue> GetStatic(string propertyName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the indexer property. |
Boolean | nonPublic | true to reflect non-public property. |
Returns
Type | Description |
---|---|
Indexer<TIndicies, TValue> | The reflected property; or null, if property doesn't exist. |
Require(String, Boolean)
Reflects instance indexer property.
Declaration
public static Indexer<T, TIndicies, TValue> Require(string propertyName = "Item", bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the indexer property. |
Boolean | nonPublic | true to reflect non-public property. |
Returns
Type | Description |
---|---|
Indexer<T, TIndicies, TValue> | The reflected indexer property. |
Exceptions
Type | Condition |
---|---|
MissingPropertyException | The property doesn't exist. |
RequireStatic(String, Boolean)
Reflects static indexer property.
Declaration
public static Indexer<TIndicies, TValue> RequireStatic(string propertyName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the indexer property. |
Boolean | nonPublic | true to reflect non-public property. |
Returns
Type | Description |
---|---|
Indexer<TIndicies, TValue> | The reflected indexer property. |
Exceptions
Type | Condition |
---|---|
MissingPropertyException | The property doesn't exist. |