Наследование: Newtonsoft.Json.Serialization.JsonPrimitiveContract
 private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
 {
     contract.InvokeOnSerializing(value, base.Serializer.Context);
     TryConvertToString(value, contract.UnderlyingType, out string s);
     writer.WriteValue(s);
     contract.InvokeOnSerialized(value, base.Serializer.Context);
 }
        protected virtual JsonStringContract CreateStringContract(Type objectType)
        {
            JsonStringContract jsonStringContract = new JsonStringContract(objectType);

            this.InitializeContract(jsonStringContract);
            return(jsonStringContract);
        }
        protected virtual JsonStringContract CreateStringContract(Type objectType)
        {
            JsonStringContract contract = new JsonStringContract(objectType);

            this.method_7(contract);
            return(contract);
        }
Пример #4
0
        private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
        {
            string str;

            this.OnSerializing(writer, contract, value);
            JsonSerializerInternalWriter.TryConvertToString(value, contract.UnderlyingType, out str);
            writer.WriteValue(str);
            this.OnSerialized(writer, contract, value);
        }
Пример #5
0
        private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
        {
            OnSerializing(writer, contract, value);

            TryConvertToString(value, contract.UnderlyingType, out string s);
            writer.WriteValue(s);

            OnSerialized(writer, contract, value);
        }
    private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
    {
      contract.InvokeOnSerializing(value, Serializer.Context);

      string s;
      TryConvertToString(value, contract.UnderlyingType, out s);
      writer.WriteValue(s);

      contract.InvokeOnSerialized(value, Serializer.Context);
    }
    private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
    {
      OnSerializing(writer, contract, value);

      string s;
      TryConvertToString(value, contract.UnderlyingType, out s);
      writer.WriteValue(s);

      OnSerialized(writer, contract, value);
    }
Пример #8
0
 protected virtual JsonStringContract CreateStringContract(Type objectType)
 {
   JsonStringContract jsonStringContract = new JsonStringContract(objectType);
   this.InitializeContract((JsonContract) jsonStringContract);
   return jsonStringContract;
 }
 // Token: 0x06000BF7 RID: 3063
 // RVA: 0x00046CF4 File Offset: 0x00044EF4
 private void SerializeString(JsonWriter writer, object value, JsonStringContract contract)
 {
     this.OnSerializing(writer, contract, value);
     string value2;
     JsonSerializerInternalWriter.TryConvertToString(value, contract.UnderlyingType, out value2);
     writer.WriteValue(value2);
     this.OnSerialized(writer, contract, value);
 }