Class ConversionUtils
Inheritance
System.Object
ConversionUtils
Assembly: Steeltoe.Common.dll
Syntax
public static class ConversionUtils : object
Methods
|
Edit this page
View Source
CanConvertElements(Type, Type, IConversionService)
Declaration
public static bool CanConvertElements(Type sourceElementType, Type targetElementType, IConversionService conversionService)
Parameters
Type |
Name |
Description |
Type |
sourceElementType |
|
Type |
targetElementType |
|
IConversionService |
conversionService |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
CanCreateCompatDictionaryFor(Type)
Declaration
public static bool CanCreateCompatDictionaryFor(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
CanCreateCompatListFor(Type)
Declaration
public static bool CanCreateCompatListFor(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
ContainsPublicNoArgConstructor(Type)
Declaration
public static bool ContainsPublicNoArgConstructor(Type collectionType)
Parameters
Type |
Name |
Description |
Type |
collectionType |
|
Returns
Type |
Description |
System.Boolean |
|
|
Edit this page
View Source
Count(IEnumerable)
Declaration
public static int Count(IEnumerable enumerable)
Parameters
Type |
Name |
Description |
IEnumerable |
enumerable |
|
Returns
Type |
Description |
System.Int32 |
|
|
Edit this page
View Source
CreateCompatDictionaryFor(Type)
Declaration
public static IDictionary CreateCompatDictionaryFor(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Type |
Description |
IDictionary |
|
|
Edit this page
View Source
CreateCompatListFor(Type)
Declaration
public static IList CreateCompatListFor(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
|
Edit this page
View Source
GetConstructorIfAvailable(Type, Type[])
Declaration
public static ConstructorInfo GetConstructorIfAvailable(Type clazz, params Type[] paramTypes)
Parameters
Type |
Name |
Description |
Type |
clazz |
|
Type[] |
paramTypes |
|
Returns
Type |
Description |
ConstructorInfo |
|
|
Edit this page
View Source
GetDictionaryKeyType(Type)
Declaration
public static Type GetDictionaryKeyType(Type sourceType)
Parameters
Type |
Name |
Description |
Type |
sourceType |
|
Returns
|
Edit this page
View Source
GetDictionaryValueType(Type)
Declaration
public static Type GetDictionaryValueType(Type sourceType)
Parameters
Type |
Name |
Description |
Type |
sourceType |
|
Returns
|
Edit this page
View Source
GetElementType(Type)
Declaration
public static Type GetElementType(Type sourceType)
Parameters
Type |
Name |
Description |
Type |
sourceType |
|
Returns
|
Edit this page
View Source
GetMethodIfAvailable(Type, String, Type[])
Declaration
public static MethodInfo GetMethodIfAvailable(Type clazz, string methodName, params Type[] paramTypes)
Parameters
Type |
Name |
Description |
Type |
clazz |
|
System.String |
methodName |
|
Type[] |
paramTypes |
|
Returns
Type |
Description |
MethodInfo |
|
|
Edit this page
View Source
GetNullableElementType(Type)
Declaration
public static Type GetNullableElementType(Type nullable)
Parameters
Type |
Name |
Description |
Type |
nullable |
|
Returns
|
Edit this page
View Source
GetStaticMethod(Type, String, Type[])
Declaration
public static MethodInfo GetStaticMethod(Type clazz, string methodName, params Type[] args)
Parameters
Type |
Name |
Description |
Type |
clazz |
|
System.String |
methodName |
|
Type[] |
args |
|
Returns
Type |
Description |
MethodInfo |
|
|
Edit this page
View Source
ToString(IEnumerable, Type, IConversionService)
Declaration
public static string ToString(IEnumerable collection, Type targetType, IConversionService conversionService)
Parameters
Type |
Name |
Description |
IEnumerable |
collection |
|
Type |
targetType |
|
IConversionService |
conversionService |
|
Returns
Type |
Description |
System.String |
|