C# Class DotNetify.VMContractResolver

Custom view model resolver for JSON serializer.
Inheritance: Newtonsoft.Json.Serialization.DefaultContractResolver
显示文件 Open project: dsuryd/dotNetify

Public Methods

Method Description
VMContractResolver ( List ignoredPropertyNames = null ) : System

Constructor that accepts list of property names to exclude from serialization.

Protected Methods

Method Description
CreateProperty ( MemberInfo member, MemberSerialization memberSerialization ) : JsonProperty

Overrides this method to exclude properties with [Ignore] attribute or those that are in the given list.

ResolveContractConverter ( Type objectType ) : JsonConverter

Overrides this method to prevent serialization of ICommand property type.

Method Details

CreateProperty() protected method

Overrides this method to exclude properties with [Ignore] attribute or those that are in the given list.
protected CreateProperty ( MemberInfo member, MemberSerialization memberSerialization ) : JsonProperty
member System.Reflection.MemberInfo
memberSerialization MemberSerialization
return Newtonsoft.Json.Serialization.JsonProperty

ResolveContractConverter() protected method

Overrides this method to prevent serialization of ICommand property type.
protected ResolveContractConverter ( Type objectType ) : JsonConverter
objectType System.Type
return Newtonsoft.Json.JsonConverter

VMContractResolver() public method

Constructor that accepts list of property names to exclude from serialization.
public VMContractResolver ( List ignoredPropertyNames = null ) : System
ignoredPropertyNames List Property names to exclude from serialization.
return System