Newtonsoft.Json.Serialization.DefaultContractResolver.CreateProperties C# (CSharp) Method

CreateProperties() protected method

Creates properties for the given JsonObjectContract.
protected CreateProperties ( JsonObjectContract contract ) : IList
contract JsonObjectContract The contract to create properties for.
return IList
    protected virtual IList<JsonProperty> CreateProperties(JsonObjectContract contract)
    {
      List<MemberInfo> members = GetSerializableMembers(contract.UnderlyingType);
      if (members == null)
        throw new JsonSerializationException("Null collection of seralizable members returned.");

      JsonPropertyCollection properties = new JsonPropertyCollection(contract);

      foreach (MemberInfo member in members)
      {
        JsonProperty property = CreateProperty(contract, member);

        if (property != null)
          properties.AddProperty(property);
      }

      return properties;
    }