Class SchemaUtils
Inheritance
System.Object
SchemaUtils
Assembly: Eco.Core.dll
Syntax
public static class SchemaUtils : Object
Methods
AsClassSchemaType(String)
Returns class schema type. If typeNameOrSchemaType already class schema type then returns as is otherwise assume it is type name and builds schema type from the type name.
Declaration
public static string AsClassSchemaType(string typeNameOrSchemaType)
Parameters
| Type |
Name |
Description |
| System.String |
typeNameOrSchemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetArray2DElementSchemaType(String)
Declaration
public static string GetArray2DElementSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetArrayElementSchemaType(String)
Declaration
public static string GetArrayElementSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetClassName(String)
Declaration
public static string GetClassName(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetClassSchemaType(String)
Returns class schema type for typeName. If typeName is generic type name then it will be converted to schema compatible name like List`1[[System.String, Version=1.0.0.0, PublicToken=null, Culture=neutral]] -> class[List{string}].
Declaration
public static string GetClassSchemaType(string typeName)
Parameters
| Type |
Name |
Description |
| System.String |
typeName |
|
Returns
| Type |
Description |
| System.String |
|
GetDictionaryKeySchemaType(String)
Declaration
public static string GetDictionaryKeySchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetDictionaryValueSchemaType(String)
Declaration
public static string GetDictionaryValueSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetEnumerableElementSchemaType(String)
Declaration
public static string GetEnumerableElementSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.String |
|
GetSchemaType(Type)
Returns schema name corresponding to type. It uses generation rules or built-in name if available.
Declaration
public static string GetSchemaType(Type type)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
Returns
| Type |
Description |
| System.String |
|
IsArray2DSchemaType(String)
Declaration
public static bool IsArray2DSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsArraySchemaType(String)
Declaration
public static bool IsArraySchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsClassSchemaType(String)
Declaration
public static bool IsClassSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsDictionarySchemaType(String)
Declaration
public static bool IsDictionarySchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsEnumerableSchemaType(String)
Declaration
public static bool IsEnumerableSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsEnumSchemaType(String)
Declaration
public static bool IsEnumSchemaType(string schemaType)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsSchemaType(String)
Declaration
public static bool IsSchemaType(string value)
Parameters
| Type |
Name |
Description |
| System.String |
value |
|
Returns
| Type |
Description |
| System.Boolean |
|
MakeArraySchemaType(String)
Declaration
public static string MakeArraySchemaType(string elementSchemaType)
Parameters
| Type |
Name |
Description |
| System.String |
elementSchemaType |
|
Returns
| Type |
Description |
| System.String |
|
MakeDictionarySchemaType(String, String)
Declaration
public static string MakeDictionarySchemaType(string keySchemaType, string valueSchemaType)
Parameters
| Type |
Name |
Description |
| System.String |
keySchemaType |
|
| System.String |
valueSchemaType |
|
Returns
| Type |
Description |
| System.String |
|
MakeEnumerableSchemaType(String)
Declaration
public static string MakeEnumerableSchemaType(string elementSchemaType)
Parameters
| Type |
Name |
Description |
| System.String |
elementSchemaType |
|
Returns
| Type |
Description |
| System.String |
|
MakeEnumSchemaType(String)
Declaration
public static string MakeEnumSchemaType(string enumType)
Parameters
| Type |
Name |
Description |
| System.String |
enumType |
|
Returns
| Type |
Description |
| System.String |
|
MakeGenericClassSchemaType(String, String)
Declaration
public static string MakeGenericClassSchemaType(string typeName, string genericArgSchemaType)
Parameters
| Type |
Name |
Description |
| System.String |
typeName |
|
| System.String |
genericArgSchemaType |
|
Returns
| Type |
Description |
| System.String |
|
MakeGenericClassSchemaType(String, String, String)
Declaration
public static string MakeGenericClassSchemaType(string typeName, string genericArgSchemaType1, string genericArgSchemaType2)
Parameters
| Type |
Name |
Description |
| System.String |
typeName |
|
| System.String |
genericArgSchemaType1 |
|
| System.String |
genericArgSchemaType2 |
|
Returns
| Type |
Description |
| System.String |
|
MakeGenericClassSchemaType(String, String, String, String)
Declaration
public static string MakeGenericClassSchemaType(string typeName, string genericArgSchemaType1, string genericArgSchemaType2, string genericArgSchemaType3)
Parameters
| Type |
Name |
Description |
| System.String |
typeName |
|
| System.String |
genericArgSchemaType1 |
|
| System.String |
genericArgSchemaType2 |
|
| System.String |
genericArgSchemaType3 |
|
Returns
| Type |
Description |
| System.String |
|
TryGetClassName(String, out String)
Declaration
public static bool TryGetClassName(string schemaType, out string className)
Parameters
| Type |
Name |
Description |
| System.String |
schemaType |
|
| System.String |
className |
|
Returns
| Type |
Description |
| System.Boolean |
|
WrapClassSchemaType(String)
Declaration
public static string WrapClassSchemaType(string className)
Parameters
| Type |
Name |
Description |
| System.String |
className |
|
Returns
| Type |
Description |
| System.String |
|