Class ParameterKeys
public static class ParameterKeys
- Inheritance
-
ParameterKeys
Methods
ComposeIndexer<T>(T, string, int)
Compose a key with a name and index (e.g if key is MyKey.MyKeyName
and name is MyName
and index is 5, the result key will be MyKey.MyKeyName.MyName[5]
)
public static T ComposeIndexer<T>(this T key, string name, int index) where T : ParameterKey
Parameters
Returns
- T
T.
Type Parameters
T
Type of the key value
Exceptions
- ArgumentNullException
key or name
- ArgumentOutOfRangeException
index;Must be >= 0
ComposeWith<T>(T, string)
Compose a key with a name (e.g if key is MyKey.MyKeyName
and name is MyName
, the result key will be MyKey.MyKeyName.MyName
)
public static T ComposeWith<T>(this T key, string name) where T : ParameterKey
Parameters
key
TThe key.
name
stringThe name to append to the key.
Returns
- T
The composition of key and name
Type Parameters
T
Type of the key value
Exceptions
- ArgumentNullException
key or name
FindByName(string)
public static ParameterKey FindByName(string name)
Parameters
name
string
Returns
GetKeys()
Returns property keys matching a given type
public static IEnumerable<ParameterKey> GetKeys()
Returns
IndexedKey<T>(T, int)
Creates the key with specified index.
public static T IndexedKey<T>(T key, int index) where T : ParameterKey
Parameters
key
Tindex
intThe index.
Returns
- T
Type Parameters
T
Merge(ParameterKey, Type, string)
public static ParameterKey Merge(ParameterKey key, Type ownerType, string name)
Parameters
key
ParameterKeyownerType
Typename
string
Returns
NewObject<T>(T, string)
public static ObjectParameterKey<T> NewObject<T>(T defaultValue = default, string name = null)
Parameters
defaultValue
Tname
string
Returns
Type Parameters
T
NewPermutation<T>(T, string)
public static PermutationParameterKey<T> NewPermutation<T>(T defaultValue = default, string name = null)
Parameters
defaultValue
Tname
string
Returns
Type Parameters
T
NewValue<T>(T, string)
public static ValueParameterKey<T> NewValue<T>(T defaultValue = default, string name = null) where T : struct
Parameters
defaultValue
Tname
string
Returns
Type Parameters
T
TryFindByName(string)
public static ParameterKey TryFindByName(string name)
Parameters
name
string