Search Results for

    Show / Hide Table of Contents

    Class RefCountDisposable

    Represents a disposable resource that only disposes its underlying disposable resource when all GetDisposable() have been disposed.

    Inheritance
    Object
    RefCountDisposable
    Implements
    ICancelable
    IDisposable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ToString()
    Object.ReferenceEquals(Object, Object)
    Namespace: System.Reactive.Disposables
    Assembly: System.Reactive.Core.dll
    Syntax
    public sealed class RefCountDisposable : ICancelable, IDisposable

    Constructors

    | Improve this Doc View Source

    RefCountDisposable(IDisposable)

    Initializes a new instance of the RefCountDisposable class with the specified disposable.

    Declaration
    public RefCountDisposable(IDisposable disposable)
    Parameters
    Type Name Description
    IDisposable disposable

    Underlying disposable.

    Exceptions
    Type Condition
    ArgumentNullException

    disposable is null.

    Properties

    | Improve this Doc View Source

    IsDisposed

    Gets a value that indicates whether the object is disposed.

    Declaration
    public bool IsDisposed { get; }
    Property Value
    Type Description
    Boolean

    Methods

    | Improve this Doc View Source

    Dispose()

    Disposes the underlying disposable only when all dependent disposables have been disposed.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    GetDisposable()

    Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable.

    Declaration
    public IDisposable GetDisposable()
    Returns
    Type Description
    IDisposable

    A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime.

    Implements

    ICancelable
    System.IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX