OpenStory.Common.IO.PacketBuilder.Dispose C# (CSharp) Method

Dispose() public method

Calling instance methods after calling this will cause them to throw an ObjectDisposedException.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (!this.isDisposed)
            {
                Misc.AssignNullAndDispose(ref this.stream);

                this.isDisposed = true;
            }
        }

Usage Example

Exemplo n.º 1
0
        private static void ShouldThrowOde(Action <PacketBuilder> operation)
        {
            var builder = new PacketBuilder();

            builder.Dispose();

            builder
            .Invoking(operation)
            .ShouldThrow <ObjectDisposedException>();
        }
All Usage Examples Of OpenStory.Common.IO.PacketBuilder::Dispose