Contract details for a Type used by the JsonSerializer.
Inheritance: JsonContract
Exemple #1
0
        /// <summary>
        /// Creates a <see cref="JsonLinqContract"/> for the given type.
        /// </summary>
        /// <param name="objectType">Type of the object.</param>
        /// <returns>A <see cref="JsonLinqContract"/> for the given type.</returns>
        protected virtual JsonLinqContract CreateLinqContract(Type objectType)
        {
            JsonLinqContract contract = new JsonLinqContract(objectType);

            InitializeContract(contract);

            return(contract);
        }
        /// <summary>
        /// Creates a <see cref="JsonLinqContract"/> for the given type.
        /// </summary>
        /// <param name="objectType">Type of the object.</param>
        /// <returns>A <see cref="JsonLinqContract"/> for the given type.</returns>
        protected virtual JsonLinqContract CreateLinqContract(Type objectType)
        {
            JsonLinqContract contract = new JsonLinqContract(objectType);
              InitializeContract(contract);

              return contract;
        }
 protected virtual JsonLinqContract CreateLinqContract(Type objectType)
 {
   JsonLinqContract jsonLinqContract = new JsonLinqContract(objectType);
   this.InitializeContract((JsonContract) jsonLinqContract);
   return jsonLinqContract;
 }