Class KeyConverter
Assembly: Venflow.Keys.dll
Syntax
public class KeyConverter : TypeConverter
Constructors
|
Improve this Doc
View Source
KeyConverter(Type)
Creates a new instance of a KeyConverter with the given key type.
Declaration
public KeyConverter(Type keyType)
Parameters
Type |
Name |
Description |
Type |
keyType |
The type of the key to which the KeyConverter should bind to.
|
Methods
|
Improve this Doc
View Source
CanConvertFrom(Nullable<ITypeDescriptorContext>, Type)
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
Parameters
Type |
Name |
Description |
Nullable<ITypeDescriptorContext> |
context |
|
Type |
sourceType |
|
Returns
|
Improve this Doc
View Source
CanConvertTo(Nullable<ITypeDescriptorContext>, Nullable<Type>)
Declaration
public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType)
Parameters
Type |
Name |
Description |
Nullable<ITypeDescriptorContext> |
context |
|
Nullable<Type> |
destinationType |
|
Returns
|
Improve this Doc
View Source
ConvertFrom(Nullable<ITypeDescriptorContext>, Nullable<CultureInfo>, Object)
Declaration
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
Parameters
Returns
|
Improve this Doc
View Source
ConvertTo(Nullable<ITypeDescriptorContext>, Nullable<CultureInfo>, Nullable<Object>, Type)
Declaration
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
Parameters
Returns
|
Improve this Doc
View Source
GetOrCreateKeyFactory<TValue>(Type)
Gets or creates a key factory for the given type.
Declaration
public static Func<TValue, object> GetOrCreateKeyFactory<TValue>(Type keyType)
Parameters
Type |
Name |
Description |
Type |
keyType |
|
Returns
Type |
Description |
Func<TValue, Object> |
|
Type Parameters
|
Improve this Doc
View Source
GetOrCreateKeyFactory<TKeyType, TValue>(Type)
Gets or creates a key factory for the given type.
Declaration
public static Func<TValue, TKeyType> GetOrCreateKeyFactory<TKeyType, TValue>(Type keyType)
where TKeyType : struct, IKey
Parameters
Type |
Name |
Description |
Type |
keyType |
|
Returns
Type |
Description |
Func<TValue, TKeyType> |
|
Type Parameters
Name |
Description |
TKeyType |
|
TValue |
|