private void GetObjectData()
 {
     using (Stream output = m_objectProvider.GetData())
     {
         BinaryFormatter formatter = new BinaryFormatter();
         m_mbi = (MethodBodyInfo)formatter.Deserialize(output, null);
     }
 }
        public override void GetData(object method, Stream outgoingData)
        {
            if (method != null)
            {
                MethodBodyInfo info = new MethodBodyInfo();
                info.TypeName       = method.GetType().Name;
                info.MethodToString = method.ToString();

                IILReader reader = ILReaderFactory.GetReader(method);
                foreach (ILInstruction instr in reader)
                {
                    info.Instructions.Add(instr.ToString());
                }

                info.FixupSuccess = true;

                BinaryFormatter formatter = new BinaryFormatter();
                formatter.Serialize(outgoingData, info);
            }
        }