.NET Portable TypeCast
3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
|
Wraps the model value for the converter in a conversion-context More...
Public Member Functions | |
ConvertContext (object modelValue) | |
Creates a new instance of ConvertContext<TIn, TOut> More... | |
ConvertContext (object modelValue) | |
Creates a new instance of ConvertContext More... | |
override string | ToString () |
A string representation of the current instance. More... | |
Properties | |
Type | From [get, set] |
The source Type from which to convert to the Type of To More... | |
Type | To [get, set] |
The target Type to which to convert the Type of From to More... | |
Type | Argument [get, set] |
The argument Type of the model as used in ConvertTo<TIn, TOut>(TIn, object) More... | |
object | Value [get] |
An optional default value for the given type, which must not be null, otherwise an ConverterException may be thrown. More... | |
Converter | Converter [get, set] |
The Converter instance for the corresponding types TIn and TOut More... | |
string | Caller [get, set] |
The caller method name which is automatically filled-in via the CallerMemberNameAttribute, and used for context information. More... | |
bool | Nullable [get, set] |
Whether the original From Type was nullable More... | |
bool | ThrowExceptions [get, set] |
Whether to throw exceptions. false by default such that no ConverterException is thrown More... | |
object | Method [get, set] |
The conversion method that was invoked More... | |
MethodInfo | MethodInfo [get, set] |
The MethodInfo instance of the Method More... | |
Wraps the model value for the converter in a conversion-context
Wraps the model value for the converter in a conversion-context.
On rare occasions, a contextual data structure may be required which provides meta-data about the converting-process.
Definition at line 26 of file ConvertContext.cs.
Core.TypeCast.Base.ConvertContext< TIn, TOut >.ConvertContext | ( | object | modelValue | ) |
Creates a new instance of ConvertContext<TIn, TOut>
modelValue | The model value that was passed as second parameter to the conversion function |
Definition at line 32 of file ConvertContext.cs.
Core.TypeCast.Base.ConvertContext< TIn, TOut >.ConvertContext | ( | object | modelValue | ) |
Creates a new instance of ConvertContext
modelValue | The model value that was passed as second parameter to the conversion function |
Definition at line 50 of file ConvertContext.cs.
override string Core.TypeCast.Base.ConvertContext< TIn, TOut >.ToString | ( | ) |
A string representation of the current instance.
Definition at line 111 of file ConvertContext.cs.
|
getset |
The argument Type of the model
as used in ConvertTo<TIn, TOut>(TIn, object)
Definition at line 68 of file ConvertContext.cs.
|
getset |
The caller method name which is automatically filled-in via the CallerMemberNameAttribute, and used for context information.
Definition at line 83 of file ConvertContext.cs.
|
getset |
The Converter instance for the corresponding types TIn and TOut
Definition at line 78 of file ConvertContext.cs.
|
getset |
The source Type from which to convert to the Type of To
Definition at line 58 of file ConvertContext.cs.
|
getset |
The conversion method that was invoked
Definition at line 98 of file ConvertContext.cs.
|
getset |
The MethodInfo instance of the Method
Definition at line 103 of file ConvertContext.cs.
|
getset |
Whether the original From Type was nullable
Definition at line 88 of file ConvertContext.cs.
|
getset |
Whether to throw exceptions. false
by default such that no ConverterException is thrown
Definition at line 93 of file ConvertContext.cs.
|
getset |
The target Type to which to convert the Type of From to
Definition at line 63 of file ConvertContext.cs.
|
get |
An optional default value for the given type, which must not be null, otherwise an ConverterException may be thrown.
Definition at line 73 of file ConvertContext.cs.