Example #1
0
		public void NestedObjectReferences ()
		{
			MemoryStream ms = new MemoryStream ();

			var cls = new Class { Name = "MyClass" };
			var ob = cls.NewInstance ();

			BinaryFormatter bf = new BinaryFormatter();
			bf.Serialize (ms, new DynamicProxy (ob));

			ms.Position = 0;

			Instance ins = (Instance) bf.Deserialize (ms);
			Assert.AreEqual ("MyClass", ins.Class.Name);
		}
Example #2
0
		public ObjectStreamClass (Class klass)
		{
			this.klass = klass;
		}
Example #3
0
		public ObjectStreamClass(SerializationInfo info, StreamingContext context)
		{
			klass = (Class)info.GetValue("0", typeof(object));
		}
Example #4
0
		public ClassSerializationProxy (Class klass)
		{
			this.className = klass.Name;
		}