Verifies that an object can be serialized then deserialized to and from a stream using a
BinaryFormatter and returns the resulting deserialized object.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public static T BinarySerializeThenDeserialize<T>( T value ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function BinarySerializeThenDeserialize(Of T) ( _ value As T _ ) As T |
Parameters
- value
- Type: T
The value.
Type Parameters
- T
Return Value
The serialized then deserialized object.
Remarks
The assertion fails if value is null.
Exceptions
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
