Verifies that a type supports the runtime serialization protocol.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public static void IsSerializableType(
	Type type
)
Visual Basic (Declaration)
Public Shared Sub IsSerializableType ( _
	type As Type _
)

Parameters

type
Type: System..::.Type
The type to verify.

Remarks

Ensures that the type has the SerializableAttribute. Also ensures that if it implements ISerializable then it also has a deserialization constructor with signature .ctor(SerializationInfo info, StreamingContext context).

Exceptions

ExceptionCondition
Gallio.Framework.Assertions..::.AssertionExceptionThrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise.
System..::.ArgumentNullExceptionThrown if type is null.

See Also