Table of Contents

Class TypeResolver

Namespace
NRules.Json
Assembly
NRules.Json.dll

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

Type

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

string

RegisterAlias(string, Type)

Registers an alias for a CLR type for the purpose of JSON serialization.

public void RegisterAlias(string alias, Type type)

Parameters

alias string

String representation of the CLR type.

type Type

CLR type.

RegisterDefaultAliases()

Registers built-in C# types as aliases for rule serialization.

public void RegisterDefaultAliases()