Verifies that a type supports the runtime serialization protocol.
Namespace:
MbUnit.FrameworkAssembly: 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
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
| System..::.ArgumentNullException | Thrown if type is null. |
