C# Class CrestSharp.Infrastructure.CrestJsonContractResolver

This contract resolver gets only private fields through the whole class hierarchy for ICrestObject subclasses. This is unfortunately needed, because JSON.NET always reads a _property_ when it writes it with a custom JsonConverter. That means a lazy load of an object would trigger an infinite loop of loading the same object. Therefor we use this to read/write the backing fields instead of the properties which doesn't trigger the lazy loading.
Inheritance: Newtonsoft.Json.Serialization.DefaultContractResolver
Exibir arquivo Open project: rischwa/eve-fast-fitting-assessment

Protected Methods

Method Description
CreateProperties ( Type type, MemberSerialization memberSerialization ) : IList

Private Methods

Method Description
GetAllFields ( Type t ) : IEnumerable

Method Details

CreateProperties() protected method

protected CreateProperties ( Type type, MemberSerialization memberSerialization ) : IList
type System.Type
memberSerialization MemberSerialization
return IList