Show / Hide Table of Contents

    Class Observable<T>

    Observable Base class

    Inheritance
    Object
    ObjectRoot
    Observable<T>
    Implements
    IObservable<T>
    IObserver<T>
    INotifyCollectionChanged
    Inherited Members
    ObjectRoot.GraphLogger
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Graph.Communications.Common
    Assembly: Microsoft.Graph.Communications.Common.dll
    Syntax
    public class Observable<T> : ObjectRoot, IObservable<T>, IObserver<T>, INotifyCollectionChanged
    Type Parameters
    Name Description
    T

    Type of the value being observed.

    Constructors

    Observable(IGraphLogger)

    Initializes a new instance of the Observable<T> class.

    Declaration
    public Observable(IGraphLogger logger)
    Parameters
    Type Name Description
    IGraphLogger logger

    Logger instance.

    Properties

    Observers

    Gets the observers.

    Declaration
    public ICollection<IObserver<T>> Observers { get; }
    Property Value
    Type Description
    ICollection<IObserver<T>>

    Methods

    OnCompleted()

    Notify observers of completion.

    Declaration
    public void OnCompleted()

    OnError(Exception)

    Notify observers of error.

    Declaration
    public void OnError(Exception error)
    Parameters
    Type Name Description
    Exception error

    Exception information.

    OnNext(T)

    Notify observers.

    Declaration
    public void OnNext(T value)
    Parameters
    Type Name Description
    T value

    Value to observers.

    OnNext(T, IEnumerable<IObserver<T>>)

    Notify observers.

    Declaration
    public void OnNext(T value, IEnumerable<IObserver<T>> observersSubset)
    Parameters
    Type Name Description
    T value

    Value to observers.

    IEnumerable<IObserver<T>> observersSubset

    Subset of observers to notify.

    Subscribe(IObserver<T>)

    Notifies the provider that an observer is to receive notifications.

    Declaration
    public virtual IDisposable Subscribe(IObserver<T> observer)
    Parameters
    Type Name Description
    IObserver<T> observer

    The object that is to receive notifications.

    Returns
    Type Description
    IDisposable

    A reference to an interface that allows observers to stop receiving notifications before the provider has finished sending them.

    Events

    CollectionChanged

    Collection changed event.

    Declaration
    public event NotifyCollectionChangedEventHandler CollectionChanged
    Event Type
    Type Description
    NotifyCollectionChangedEventHandler

    Implements

    System.IObservable<T>
    System.IObserver<T>
    System.Collections.Specialized.INotifyCollectionChanged

    Extension Methods

    AdditionalDataExtensions.SetInAdditionalData(Object, String, Object)
    Extensions.Pin(Object)
    Extensions.ChangeType(Object, Type)
    Extensions.ChangeType<T>(Object)
    Extensions.TryDispose(Object, IGraphLogger)
    ReflectionUtils.GetPropertyUsingReflection(Object, String)
    ReflectionUtils.SetPropertyUsingReflection(Object, String, Object)
    Validator.IsNull(Object, String, String)
    Validator.NotNull<T>(T, String, String)
    Validator.Equals<T>(T, T, String, String)
    Validator.Equals<T, TE>(T, T, String)
    Validator.NotEquals<T>(T, T, String, String)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.