Dispose() public method

Releases unmanaged and - optionally - managed resources
public Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void
示例#1
0
        public void DisposeDisposesTheReferencedScope()
        {
            var scopeMock = new Mock <IDisposable>();
            var testee    = new NamedScopeReference(scopeMock.Object);

            testee.Dispose();

            scopeMock.Verify(scope => scope.Dispose());
        }
        public void DisposeDisposesTheReferencedScope()
        {
            var scopeMock = new Mock<IDisposable>();
            var testee = new NamedScopeReference(scopeMock.Object);

            testee.Dispose();

            scopeMock.Verify(scope => scope.Dispose());
        }