C# Class Newtonsoft.Json.Serialization.DefaultContractResolver

Inheritance: IContractResolver
Afficher le fichier Open project: thirumg/Avro.NET Class Usage Examples

Méthodes publiques

Méthode Description
DefaultContractResolver ( ) : System

Initializes a new instance of the DefaultContractResolver class.

ResolveContract ( Type type ) : JsonContract

Resolves the contract for a given type.

Méthodes protégées

Méthode Description
CreateArrayContract ( Type objectType ) : JsonArrayContract

Creates a JsonArrayContract for the given type.

CreateDictionaryContract ( Type objectType ) : JsonDictionaryContract

Creates a JsonDictionaryContract for the given type.

CreateLinqContract ( Type objectType ) : JsonLinqContract

Creates a JsonLinqContract for the given type.

CreateMemberValueProvider ( MemberInfo member ) : IValueProvider

Creates the IValueProvider used by the serializer to get and set values from a member.

CreateObjectContract ( Type objectType ) : JsonObjectContract

Creates a JsonObjectContract for the given type.

CreatePrimitiveContract ( Type objectType ) : Newtonsoft.Json.Serialization.JsonPrimitiveContract

Creates a JsonPrimitiveContract for the given type.

CreateProperties ( JsonObjectContract contract ) : IList

Creates properties for the given JsonObjectContract.

CreateProperty ( JsonObjectContract contract, MemberInfo member ) : JsonProperty

Creates a JsonProperty for the given MemberInfo.

GetSerializableMembers ( Type objectType ) : List

Gets the serializable members for the type.

ResolveContractConverter ( Type objectType ) : JsonConverter

Resolves the default JsonConverter for the contract.

ResolvePropertyName ( string propertyName ) : string

Resolves the name of the property.

Private Methods

Méthode Description
CreateContract ( Type objectType ) : JsonContract
GetClrTypeFullName ( Type type ) : string
GetParametrizedConstructor ( Type objectType ) : ConstructorInfo
InitializeContract ( JsonContract contract ) : void
IsValidCallback ( MethodInfo method, ParameterInfo parameters, Type attributeType, MethodInfo currentCallback, Type &prevAttributeType ) : bool
ShouldSerializeEntityMember ( MemberInfo memberInfo ) : bool

Method Details

CreateArrayContract() protected méthode

Creates a JsonArrayContract for the given type.
protected CreateArrayContract ( Type objectType ) : JsonArrayContract
objectType System.Type Type of the object.
Résultat JsonArrayContract

CreateDictionaryContract() protected méthode

Creates a JsonDictionaryContract for the given type.
protected CreateDictionaryContract ( Type objectType ) : JsonDictionaryContract
objectType System.Type Type of the object.
Résultat JsonDictionaryContract

CreateLinqContract() protected méthode

Creates a JsonLinqContract for the given type.
protected CreateLinqContract ( Type objectType ) : JsonLinqContract
objectType System.Type Type of the object.
Résultat JsonLinqContract

CreateMemberValueProvider() protected méthode

Creates the IValueProvider used by the serializer to get and set values from a member.
protected CreateMemberValueProvider ( MemberInfo member ) : IValueProvider
member System.Reflection.MemberInfo The member.
Résultat IValueProvider

CreateObjectContract() protected méthode

Creates a JsonObjectContract for the given type.
protected CreateObjectContract ( Type objectType ) : JsonObjectContract
objectType System.Type Type of the object.
Résultat JsonObjectContract

CreatePrimitiveContract() protected méthode

Creates a JsonPrimitiveContract for the given type.
protected CreatePrimitiveContract ( Type objectType ) : Newtonsoft.Json.Serialization.JsonPrimitiveContract
objectType System.Type Type of the object.
Résultat Newtonsoft.Json.Serialization.JsonPrimitiveContract

CreateProperties() protected méthode

Creates properties for the given JsonObjectContract.
protected CreateProperties ( JsonObjectContract contract ) : IList
contract JsonObjectContract The contract to create properties for.
Résultat IList

CreateProperty() protected méthode

Creates a JsonProperty for the given MemberInfo.
protected CreateProperty ( JsonObjectContract contract, MemberInfo member ) : JsonProperty
contract JsonObjectContract The member's declaring types .
member System.Reflection.MemberInfo The member to create a for.
Résultat JsonProperty

DefaultContractResolver() public méthode

Initializes a new instance of the DefaultContractResolver class.
public DefaultContractResolver ( ) : System
Résultat System

GetSerializableMembers() protected méthode

Gets the serializable members for the type.
protected GetSerializableMembers ( Type objectType ) : List
objectType System.Type The type to get serializable members for.
Résultat List

ResolveContract() public méthode

Resolves the contract for a given type.
public ResolveContract ( Type type ) : JsonContract
type System.Type The type to resolve a contract for.
Résultat JsonContract

ResolveContractConverter() protected méthode

Resolves the default JsonConverter for the contract.
protected ResolveContractConverter ( Type objectType ) : JsonConverter
objectType System.Type Type of the object.
Résultat Newtonsoft.Json.JsonConverter

ResolvePropertyName() protected méthode

Resolves the name of the property.
protected ResolvePropertyName ( string propertyName ) : string
propertyName string Name of the property.
Résultat string