InvokeOnSerializing() private method

private InvokeOnSerializing ( object o, StreamingContext context ) : void
o object
context System.Runtime.Serialization.StreamingContext
return void
Example #1
0
 private void OnSerializing(JsonWriter writer, JsonContract contract, object value)
 {
     if (this.TraceWriter != null && this.TraceWriter.LevelFilter >= TraceLevel.Info)
     {
         this.TraceWriter.Trace(TraceLevel.Info, JsonPosition.FormatMessage(null, writer.Path, "Started serializing {0}".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType)), null);
     }
     contract.InvokeOnSerializing(value, this.Serializer._context);
 }
    private void OnSerializing(JsonWriter writer, JsonContract contract, object value)
    {
      if (TraceWriter != null && TraceWriter.LevelFilter >= TraceLevel.Info)
        TraceWriter.Trace(TraceLevel.Info, JsonPosition.FormatMessage(null, writer.Path, "Started serializing {0}".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType)), null);

      contract.InvokeOnSerializing(value, Serializer.Context);
    }