Verifies that an object can be deserialized 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 BinaryDeserialize<T>( Stream stream, string messageFormat, params Object[] messageArgs ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function BinaryDeserialize(Of T) ( _ stream As Stream, _ messageFormat As String, _ ParamArray messageArgs As Object() _ ) As T |
Parameters
- stream
- Type: System.IO..::.Stream
The stream to deserialize.
- messageFormat
- Type: System..::.String
The custom assertion message format, or null if none.
- messageArgs
- Type: array<
System..::.Object
>[]()[]
The custom assertion message arguments, or null if none.
Type Parameters
- T
Return Value
The deserialized object.
Remarks
The assertion fails if stream is null.
Exceptions
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
