• API Documentation
Show / Hide Table of Contents
  • Rssdp
    • AggregateSsdpDeviceLocator
    • CustomHttpHeader
    • CustomHttpHeadersCollection
    • DeviceAvailableEventArgs
    • DeviceEventArgs
    • DeviceNetworkType
    • DeviceNetworkTypeExtensions
    • DeviceUnavailableEventArgs
    • DiscoveredSsdpDevice
    • ExceptionExtensions
    • ISsdpLogger
    • NullLogger
    • ServiceEventArgs
    • SocketClosedException
    • SocketFactory
    • SsdpDevice
    • SsdpDeviceExtensions
    • SsdpDeviceIcon
    • SsdpDeviceLocator
    • SsdpDevicePropertiesCollection
    • SsdpDeviceProperty
    • SsdpDevicePublisher
    • SsdpEmbeddedDevice
    • SsdpRootDevice
    • SsdpService
    • SsdpStandardsMode
    • SsdpTraceLogger
  • Rssdp.Infrastructure
    • DisposableManagedObjectBase
    • HttpParserBase<T>
    • HttpRequestParser
    • HttpResponseParser
    • ISocketFactory
    • ISsdpCommunicationsServer
    • ISsdpDeviceLocator
    • ISsdpDevicePublisher
    • IUdpSocket
    • IUpnpDeviceValidator
    • ReceivedUdpData
    • RequestReceivedEventArgs
    • ResponseReceivedEventArgs
    • SsdpCommunicationsServer
    • SsdpConstants
    • SsdpDeviceLocatorBase
    • SsdpDevicePublisherBase
    • UdpEndPoint
    • Upnp10DeviceValidator

Class DisposableManagedObjectBase

Correclty implements the System.IDisposable interface and pattern for an object containing only managed resources, and adds a few common niceities not on the interface such as an IsDisposed property.

Inheritance
System.Object
DisposableManagedObjectBase
SsdpCommunicationsServer
SsdpDeviceLocatorBase
SsdpDevicePublisherBase
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Rssdp.Infrastructure
Assembly: cs.temp.dll.dll
Syntax
public abstract class DisposableManagedObjectBase : IDisposable

Properties

IsDisposed

Sets or returns a boolean indicating whether or not this instance has been disposed.

Declaration
public bool IsDisposed { get; }
Property Value
Type Description
System.Boolean
See Also
Dispose()

Methods

Dispose()

Disposes this object instance and all internally managed resources.

Declaration
public void Dispose()
Remarks

Sets the IsDisposed property to true. Does not explicitly throw an exception if called multiple times, but makes no promises about behaviour of derived classes.

See Also
IsDisposed

Dispose(Boolean)

Override this method and dispose any objects you own the lifetime of if disposing is true;

Declaration
protected abstract void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

True if managed objects should be disposed, if false, only unmanaged resources should be released.

ThrowIfDisposed()

Throws and System.ObjectDisposedException if the IsDisposed property is true.

Declaration
protected virtual void ThrowIfDisposed()
Exceptions
Type Condition
System.ObjectDisposedException

Thrown if the IsDisposed property is true.

See Also
IsDisposed
Dispose()

Implements

System.IDisposable
In This Article
Back to top Copyright (c) 2015 Troy Willmot