Class TypeResolver
Default ITypeResolver that uses assembly-qualified type names and supports type aliases.
public class TypeResolver : ITypeResolver
- Inheritance
-
TypeResolver
- Implements
- Inherited Members
Methods
GetTypeFromName(string)
Gets the CLR type that corresponds to the type name, retrieved from the JSON document.
public Type GetTypeFromName(string typeName)
Parameters
typeName
string
Returns
GetTypeName(Type)
Gets the name of the type from the CLR type, for the purpose of JSON serialization.
public string GetTypeName(Type type)
Parameters
type
Type
Returns
RegisterAlias(string, Type)
Registers an alias for a CLR type for the purpose of JSON serialization.
public void RegisterAlias(string alias, Type type)
Parameters
RegisterDefaultAliases()
Registers built-in C# types as aliases for rule serialization.
public void RegisterDefaultAliases()