public void Dispose()
{
if (!this.isDisposed)
{
Misc.AssignNullAndDispose(ref this.stream);
this.isDisposed = true;
}
}
private static void ShouldThrowOde(Action <PacketBuilder> operation) { var builder = new PacketBuilder(); builder.Dispose(); builder .Invoking(operation) .ShouldThrow <ObjectDisposedException>(); }