Dev2.Runtime.ServiceModel.Data.WebService.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            Dispose(true);
            // This object will be cleaned up by the Dispose method. 
            // Therefore, you should call GC.SupressFinalize to 
            // take this object off the finalization queue 
            // and prevent finalization code for this object 
            // from executing a second time.
            GC.SuppressFinalize(this);
        }

Same methods

WebService::Dispose ( bool disposing ) : void

Usage Example

        public void WebServiceDisposeExpectedDisposesAndNullsSource()
        {
            var service = new WebService { Source = new WebSource() };

            Assert.IsNotNull(service.Source);
            service.Dispose();
            Assert.IsNull(service.Source);
        }