コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JsonObjectContract"/> class.
        /// </summary>
        /// <param name="underlyingType">The underlying type for the contract.</param>
        public JsonObjectContract(Type underlyingType)
            : base(underlyingType)
        {
            ContractType = JsonContractType.Object;

            Properties        = new JsonPropertyCollection(UnderlyingType);
            CreatorParameters = new JsonPropertyCollection(UnderlyingType);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonDynamicContract"/> class.
 /// </summary>
 /// <param name="underlyingType">The underlying type for the contract.</param>
 public JsonDynamicContract(Type underlyingType)
     : base(underlyingType)
 {
     ContractType = JsonContractType.Dynamic;
     Properties   = new JsonPropertyCollection(UnderlyingType);
 }