title: OnSerializing method not called in Mono 3.0.1
body: <p>Tested out the same code in Visual Studio on Windows to make sure. </p>
  
  <p>Using MonoDevelop on Mac with Mono framework 3.0.1. I'm trying to serialize objects to JSON and need to populate some properties in the OnSerializing event by assigning System.Runtime.Serialization.OnSerializingAttribute to a method. However, mono framework does not appear to be calling into the method. None of the other serialization events work either. Simplified the code for example:</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Runtime.Serialization.Json;
  using System.Runtime.Serialization;
  
  namespace MyApp
  {
      class MainClass
      {
          public static void Main (string[] args)
          {
              Cereal specialK = new Cereal();
  
              DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(Cereal));
  
              specialK.TheValue="This is a what?";
  
              MemoryStream stm = new MemoryStream();
              ser.WriteObject(stm, specialK);
              string json = System.Text.Encoding.UTF8.GetString(stm.ToArray());
  
              Console.WriteLine(json);
              Console.ReadLine();
  
          }
      }
  
      [DataContract]
      class Cereal
      {
          [DataMember(Name="set_on_serialize")]
          private string _setOnSerialize = string.Empty;
  
          public Cereal() { }
  
          [DataMember(Name = "out_value")]
          public string TheValue
          {
              get;
              set;
          }
  
          [OnSerializing]
          void OnSerializing(StreamingContext content)
          {
              this._setOnSerialize = "A brick!";
          }
      }
  }
  </code></pre>
  
  <p>In Visual Studio, the output is:
      {"out_value":"This is a what?","set_on_serialize":"A brick!"}</p>
  
  <p>In MonoDevelop on Mac, I get:
      {"out_value":"This is a what?","set_on_serialize":""}</p>
  
  <p>Mono is not calling the OnSerializing event for some reason.</p>
  
  <p>Has anyone else encountered this or can you help explain why the code fails?</p>
  
  <p>Thanks</p>