Helper class matches value types for equality. This class has symmetric implementation across all languages supported by Pip.Services toolkit and used to support dynamic data processing.
More...
|
static bool | MatchValue (object expectedType, object actualValue) |
| Matches expected type to a type of a value. The expected type can be specified by a type, type name or TypeCode. More...
|
|
static bool | MatchValueByName (string expectedType, object actualValue) |
| Matches expected type to a type of a value. More...
|
|
static bool | MatchType (object expectedType, Type actualType, object actualValue=null) |
| Matches expected type to an actual type. The types can be specified as types, type names or TypeCode. More...
|
|
static bool | MatchTypeByName (string expectedType, Type actualType) |
| Matches expected type to an actual type. More...
|
|
static bool | MatchEnum (object expectedType, object value) |
|
Helper class matches value types for equality. This class has symmetric implementation across all languages supported by Pip.Services toolkit and used to support dynamic data processing.
See Convert.TypeCode
◆ MatchType()
static bool PipServices3.Commons.Reflect.TypeMatcher.MatchType |
( |
object |
expectedType, |
|
|
Type |
actualType, |
|
|
object |
actualValue = null |
|
) |
| |
|
static |
Matches expected type to an actual type. The types can be specified as types, type names or TypeCode.
- Parameters
-
expectedType | an expected type to match. |
actualType | an actual type to match. |
- Returns
- true if types are matching and false if they don't.
See MatchTypeByName(string, Type)
◆ MatchTypeByName()
static bool PipServices3.Commons.Reflect.TypeMatcher.MatchTypeByName |
( |
string |
expectedType, |
|
|
Type |
actualType |
|
) |
| |
|
static |
Matches expected type to an actual type.
- Parameters
-
expectedType | an expected type name to match. |
actualType | an actual type to match defined by type code. |
- Returns
- true if types are matching and false if they don't.
◆ MatchValue()
static bool PipServices3.Commons.Reflect.TypeMatcher.MatchValue |
( |
object |
expectedType, |
|
|
object |
actualValue |
|
) |
| |
|
static |
Matches expected type to a type of a value. The expected type can be specified by a type, type name or TypeCode.
- Parameters
-
expectedType | an expected type to match. |
actualValue | a value to match its type to the expected one. |
- Returns
- true if types are matching and false if they don't.
See MatchType(object, Type)
◆ MatchValueByName()
static bool PipServices3.Commons.Reflect.TypeMatcher.MatchValueByName |
( |
string |
expectedType, |
|
|
object |
actualValue |
|
) |
| |
|
static |
Matches expected type to a type of a value.
- Parameters
-
expectedType | an expected type to match. |
actualValue | a value to match its type to the expected one. |
- Returns
- true if types are matching and false if they don't.
The documentation for this class was generated from the following file:
- src/Reflect/TypeMatcher.cs