Search Results for

    Show / Hide Table of Contents

    Class Disposable

    Provides a set of static methods for creating Disposables.

    Inheritance
    Object
    Disposable
    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 static class Disposable

    Properties

    | Improve this Doc View Source

    Empty

    Gets the disposable that does nothing when disposed.

    Declaration
    public static IDisposable Empty { get; }
    Property Value
    Type Description
    IDisposable

    Methods

    | Improve this Doc View Source

    Create(Action)

    Creates a disposable object that invokes the specified action when disposed.

    Declaration
    public static IDisposable Create(Action dispose)
    Parameters
    Type Name Description
    Action dispose

    Action to run during the first call to Dispose(). The action is guaranteed to be run at most once.

    Returns
    Type Description
    IDisposable

    The disposable object that runs the given action upon disposal.

    Exceptions
    Type Condition
    ArgumentNullException

    dispose is null.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX