Class ConversionUtils
- Namespace
- Steeltoe.Common.Converter
- Assembly
- Steeltoe.Common.dll
public static class ConversionUtils
- Inheritance
-
ConversionUtils
- Inherited Members
-
Methods
CanConvertElements(Type, Type, IConversionService)
public static bool CanConvertElements(Type sourceElementType, Type targetElementType, IConversionService conversionService)
Parameters
sourceElementType
Type
targetElementType
Type
conversionService
IConversionService
Returns
- bool
CanCreateCompatDictionaryFor(Type)
public static bool CanCreateCompatDictionaryFor(Type type)
Parameters
type
Type
Returns
- bool
CanCreateCompatListFor(Type)
public static bool CanCreateCompatListFor(Type type)
Parameters
type
Type
Returns
- bool
ContainsPublicNoArgConstructor(Type)
public static bool ContainsPublicNoArgConstructor(Type collectionType)
Parameters
collectionType
Type
Returns
- bool
Count(IEnumerable)
public static int Count(IEnumerable enumerable)
Parameters
enumerable
IEnumerable
Returns
- int
CreateCompatDictionaryFor(Type)
public static IDictionary CreateCompatDictionaryFor(Type type)
Parameters
type
Type
Returns
- IDictionary
CreateCompatListFor(Type)
public static IList CreateCompatListFor(Type type)
Parameters
type
Type
Returns
- IList
GetConstructorIfAvailable(Type, params Type[])
public static ConstructorInfo GetConstructorIfAvailable(Type clazz, params Type[] paramTypes)
Parameters
clazz
Type
paramTypes
Type[]
Returns
- ConstructorInfo
GetDictionaryKeyType(Type)
public static Type GetDictionaryKeyType(Type sourceType)
Parameters
sourceType
Type
Returns
- Type
GetDictionaryValueType(Type)
public static Type GetDictionaryValueType(Type sourceType)
Parameters
sourceType
Type
Returns
- Type
GetElementType(Type)
public static Type GetElementType(Type sourceType)
Parameters
sourceType
Type
Returns
- Type
GetMethodIfAvailable(Type, string, params Type[])
public static MethodInfo GetMethodIfAvailable(Type clazz, string methodName, params Type[] paramTypes)
Parameters
clazz
Type
methodName
string
paramTypes
Type[]
Returns
- MethodInfo
GetNullableElementType(Type)
public static Type GetNullableElementType(Type nullable)
Parameters
nullable
Type
Returns
- Type
GetStaticMethod(Type, string, params Type[])
public static MethodInfo GetStaticMethod(Type clazz, string methodName, params Type[] args)
Parameters
clazz
Type
methodName
string
args
Type[]
Returns
- MethodInfo
ToString(IEnumerable, Type, IConversionService)
public static string ToString(IEnumerable collection, Type targetType, IConversionService conversionService)
Parameters
collection
IEnumerable
targetType
Type
conversionService
IConversionService
Returns
- string