GetObjectData() public method

public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
return void
Ejemplo n.º 1
0
	public void GetObjectData_Info_Null ()
	{
		an = new AssemblyName ();
		try {
			an.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
			Assert.Fail ("#1");
		} catch (ArgumentNullException ex) {
			Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
			Assert.IsNull (ex.InnerException, "#3");
			Assert.IsNotNull (ex.Message, "#4");
			Assert.IsNotNull (ex.ParamName, "#5");
			Assert.AreEqual ("info", ex.ParamName, "#6");
		}
	}
	public void GetObjectData_Null ()
	{
		AssemblyName an = new AssemblyName ();
		an.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
	}