Search Results for

    Show / Hide Table of Contents

    Class SingleAssignmentDisposable

    Represents a disposable resource which only allows a single assignment of its underlying disposable resource. If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an InvalidOperationException.

    Inheritance
    Object
    SingleAssignmentDisposable
    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 SingleAssignmentDisposable : ICancelable, IDisposable

    Constructors

    | Improve this Doc View Source

    SingleAssignmentDisposable()

    Initializes a new instance of the SingleAssignmentDisposable class.

    Declaration
    public SingleAssignmentDisposable()

    Properties

    | Improve this Doc View Source

    Disposable

    Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined.

    Declaration
    public IDisposable Disposable { get; set; }
    Property Value
    Type Description
    IDisposable
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the SingleAssignmentDisposable has already been assigned to.

    | 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.

    Declaration
    public void Dispose()

    Implements

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