The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

Subject<T> Class

Subject<T> Class

Represents an object that is both an observable sequence as well as an observer.

Inheritance Hierarchy

System.Object
  System.Reactive.Subjects.Subject<T>

Namespace:  System.Reactive.Subjects
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public NotInheritable Class Subject(Of T) _
    Implements ISubject(Of T), ISubject(Of T, T),  _
    IObserver(Of T), IObservable(Of T), IDisposable
'Usage
Dim instance As Subject(Of T)
public sealed class Subject<T> : ISubject<T>, 
    ISubject<T, T>, IObserver<T>, IObservable<T>, IDisposable
generic<typename T>
public ref class Subject sealed : ISubject<T>, 
    ISubject<T, T>, IObserver<T>, IObservable<T>, IDisposable
[<SealedAttribute>]
type Subject<'T> =  
    class
        interface ISubject<'T>
        interface ISubject<'T, 'T>
        interface IObserver<'T>
        interface IObservable<'T>
        interface IDisposable
    end
JScript does not support generic types and methods.

Type Parameters

  • T
    The type.

The Subject<T> type exposes the following members.

Constructors

NameDescriptionPublic methodSubjectInitializes a new instance of the Subject class.Top

Methods

NameDescriptionPublic methodDisposeReleases all resources used by the current instance of the Subject class and unsubscribe all observersPublic methodEquals(Inherited from Object.)Protected methodFinalize(Inherited from Object.)Public methodGetHashCode(Inherited from Object.)Public methodGetType(Inherited from Object.)Protected methodMemberwiseClone(Inherited from Object.)Public methodOnCompletedNotifies all subscribed observers of the end of the sequence.Public methodOnErrorNotifies all subscribed observers with the exception.Public methodOnNextNotifies all subscribed observers with the value.Public methodSubscribeSubscribes an observer to the subject.Public methodToString(Inherited from Object.)Top

Extension Methods

NameDescriptionPublic Extension MethodAggregate(Func<T, T, T>)Overloaded. Applies an accumulator function over an observable sequence. (Defined by Observable.)Public Extension MethodAggregate<T, TAccumulate>(TAccumulate, Func<TAccumulate, T, TAccumulate>)Overloaded. Applies an accumulator function over an observable sequence with the specified seed value. (Defined by Observable.)Public Extension MethodAllDetermines whether all elements of an observable sequence satisfies a condition. (Defined by Observable.)Public Extension MethodAmbPropagates the observable sequence that reacts first with the specified first and second sequence. (Defined by Observable.)Public Extension MethodAnd<T, TRight>Matches when both observable sequences have an available value. (Defined by Observable.)Public Extension MethodAny()Overloaded. Determines whether an observable sequence contains any elements. (Defined by Observable.)Public Extension MethodAny(Func<T, Boolean>)Overloaded. Determines whether all elements of an observable sequence satisfies a condition. (Defined by Observable.)Public Extension MethodAsObservableHides the identity of an observable sequence. (Defined by Observable.)Public Extension MethodAsObserverHides the identity of an observer. (Defined by Observer.)Public Extension MethodAsQbservableConverts an observable sequence into a queryable observable sequence. (Defined by Qbservable.)Public Extension MethodAssertEqual(Defined by Extensions.)Public Extension MethodBuffer(Int32)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on element count information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(Int32, Int32)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on element count information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, IScheduler)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, TimeSpan)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, Int32)Overloaded. Indicates each element of an observable sequence into a buffer that’s sent out when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, TimeSpan, IScheduler)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, Int32, IScheduler)Overloaded. Indicates each element of an observable sequence into a buffer that’s sent out when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodBuffer<T, TBufferClosing>(Func<IObservable>)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers. (Defined by Observable.)Public Extension MethodBuffer<T, TBufferOpening, TBufferClosing>(IObservable, Func<TBufferOpening, IObservable>)Overloaded. Indicates each element of a queryable observable sequence into consecutive non-overlapping buffers. (Defined by Observable.)Public Extension MethodCatch(IObservable)Overloaded. Continues an observable sequence that is terminated by an exception with the next observable sequence. (Defined by Observable.)Public Extension MethodCatch<T, TException>(Func<TException, IObservable>)Overloaded. Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler. (Defined by Observable.)Public Extension MethodCombineLatest<T, TSecond, TResult>Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element. (Defined by Observable.)Public Extension MethodConcatConcatenates two observable sequences. (Defined by Observable.)Public Extension MethodContains(T)Overloaded. Determines whether an observable sequence contains a specified element by using the default equality comparer. (Defined by Observable.)Public Extension MethodContains(T, IEqualityComparer)Overloaded. Determines whether an observable sequence contains a specified element by using a specified System.Collections.Generic.IEqualityComparer<T>. (Defined by Observable.)Public Extension MethodCountReturns a Int32 that represents the total number of elements in an observable sequence. (Defined by Observable.)Public Extension MethodDefaultIfEmpty()Overloaded. Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. (Defined by Observable.)Public Extension MethodDefaultIfEmpty(T)Overloaded. Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. (Defined by Observable.)Public Extension MethodDelay(TimeSpan)Overloaded. Indicates the observable sequence by due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodDelay(DateTimeOffset)Overloaded. Indicates the observable sequence by due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodDelay(TimeSpan, IScheduler)Overloaded. Indicates the observable sequence by due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodDelay(DateTimeOffset, IScheduler)Overloaded. Indicates the observable sequence by due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodDistinct()Overloaded. Returns an observable sequence that contains only distinct elements with a specified source. (Defined by Observable.)Public Extension MethodDistinct(IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct elements according to the comparer. (Defined by Observable.)Public Extension MethodDistinct<T, TKey>(Func<T, TKey>)Overloaded. Returns an observable sequence that contains only distinct elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinct<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinctUntilChanged()Overloaded. Returns an observable sequence that contains only distinct contiguous elements with a specified source. (Defined by Observable.)Public Extension MethodDistinctUntilChanged(IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the comparer. (Defined by Observable.)Public Extension MethodDistinctUntilChanged<T, TKey>(Func<T, TKey>)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinctUntilChanged<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. (Defined by Observable.)Public Extension MethodDo(Action)Overloaded. Invokes an action for each element in the observable sequence. (Defined by Observable.)Public Extension MethodDo(IObserver)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon graceful termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action, Action)Overloaded. Invokes an action for each element in the observable sequence, and invokes an action upon graceful or exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodElementAtReturns the element at a specified index in a sequence. (Defined by Observable.)Public Extension MethodElementAtOrDefaultReturns the element at a specified index in a sequence or a default value if the index is out of range. (Defined by Observable.)Public Extension MethodFinallyInvokes a specified action after source observable sequence terminates normally or by an exception. (Defined by Observable.)Public Extension MethodFirst()Overloaded. Returns the first element of an observable sequence with a specified source. (Defined by Observable.)Public Extension MethodFirst(Func<T, Boolean>)Overloaded. Returns the first element of an observable sequence that matches the predicate. (Defined by Observable.)Public Extension MethodFirstOrDefault()Overloaded. Returns the first element of an observable sequence, or a default value if no value is found. (Defined by Observable.)Public Extension MethodFirstOrDefault(Func<T, Boolean>)Overloaded. Returns the first element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodFoo<T, R>(Defined by MyExt.)Public Extension MethodForEachInvokes an action for each element in the observable sequence, and blocks until the sequence is terminated. (Defined by Observable.)Public Extension MethodGetEnumeratorReturns an enumerator that enumerates all values of the observable sequence. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey>(Func<T, TKey>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Groups the elements of an observable sequence and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TDuration>(Func<T, TKey>, Func<IGroupedObservable<TKey, T>, IObservable>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TDuration>(Func<T, TKey>, Func<IGroupedObservable<TKey, T>, IObservable>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TElement, TDuration>(Func<T, TKey>, Func<T, TElement>, Func<IGroupedObservable<TKey, TElement>, IObservable>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TElement, TDuration>(Func<T, TKey>, Func<T, TElement>, Func<IGroupedObservable<TKey, TElement>, IObservable>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupJoin<T, TRight, TLeftDuration, TRightDuration, TResult>Correlates the elements of two sequences based on overlapping durations, and groups the results. (Defined by Observable.)Public Extension MethodIgnoreElementsIgnores all values in an observable sequence leaving only the termination messages. (Defined by Observable.)Public Extension MethodJoin<T, TRight, TLeftDuration, TRightDuration, TResult>Correlates the elements of two sequences based on overlapping durations. (Defined by Observable.)Public Extension MethodLast()Overloaded. Returns the last element of an observable sequence with a specified source. (Defined by Observable.)Public Extension MethodLast(Func<T, Boolean>)Overloaded. Returns the last element of an observable sequence that matches the predicate. (Defined by Observable.)Public Extension MethodLastOrDefault()Overloaded. Returns last element in the observable sequence, or a default value if no value is found. (Defined by Observable.)Public Extension MethodLastOrDefault(Func<T, Boolean>)Overloaded. Returns the last element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodLatestSamples the most recent value in an observable sequence. (Defined by Observable.)Public Extension MethodLongCountReturns a Int64 that represents the total number of elements in an observable sequence. (Defined by Observable.)Public Extension MethodMaterializeMaterializes the implicit notifications of an observable sequence as explicit notification values. (Defined by Observable.)Public Extension MethodMax()Overloaded. Returns the maximum element in an observable sequence. (Defined by Observable.)Public Extension MethodMax(IComparer)Overloaded. Returns the maximum value in an observable sequence according to the specified comparer. (Defined by Observable.)Public Extension MethodMaxBy<T, TKey>(Func<T, TKey>)Overloaded. Returns the elements in an observable sequence with the maximum key value. (Defined by Observable.)Public Extension MethodMaxBy<T, TKey>(Func<T, TKey>, IComparer)Overloaded. Returns the elements in an observable sequence with the maximum key value. (Defined by Observable.)Public Extension MethodMerge(IObservable)Overloaded. Merges an observable sequence of observable sequences into an observable sequence. (Defined by Observable.)Public Extension MethodMerge(IObservable, IScheduler)Overloaded. Merges two observable sequences into a single observable sequence. (Defined by Observable.)Public Extension MethodMin()Overloaded. Returns the minimum element in an observable sequence. (Defined by Observable.)Public Extension MethodMin(IComparer)Overloaded. Returns the minimum value in an observable sequence according to the specified comparer. (Defined by Observable.)Public Extension MethodMinBy<T, TKey>(Func<T, TKey>)Overloaded. Returns the elements in an observable sequence with the minimum key value. (Defined by Observable.)Public Extension MethodMinBy<T, TKey>(Func<T, TKey>, IComparer)Overloaded. Returns the elements in an observable sequence with the minimum key value according to the specified comparer. (Defined by Observable.)Public Extension MethodMostRecentSamples the most recent value in an observable sequence. (Defined by Observable.)Public Extension MethodMulticast<T, TResult>(ISubject<T, TResult>)Overloaded. Returns a connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. (Defined by Observable.)Public Extension MethodMulticast<T, TIntermediate, TResult>(Func<ISubject<T, TIntermediate>>, Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. (Defined by Observable.)Public Extension MethodNextSamples the next value (blocking without buffering) from in an observable sequence. (Defined by Observable.)Public Extension MethodObserveOn(SynchronizationContext)Overloaded. Asynchronously notify observers on the specified synchronization context. (Defined by Observable.)Public Extension MethodObserveOn(Control)Overloaded. (Defined by ControlObservable.)Public Extension MethodObserveOn(Dispatcher)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodObserveOn(DispatcherScheduler)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodObserveOn(IScheduler)Overloaded. Asynchronously notify observers on the specified scheduler. (Defined by Observable.)Public Extension MethodObserveOnDispatcher(Defined by DispatcherObservable.)Public Extension MethodOnErrorResumeNextContinues an observable sequence that is terminated normally or by an exception with the next observable sequence. (Defined by Observable.)Public Extension MethodPublish()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence. (Defined by Observable.)Public Extension MethodPublish(T)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. (Defined by Observable.)Public Extension MethodPublish<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence. (Defined by Observable.)Public Extension MethodPublish<T, TResult>(Func<IObservable, IObservable>, T)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. (Defined by Observable.)Public Extension MethodPublishLast()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. (Defined by Observable.)Public Extension MethodPublishLast<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. (Defined by Observable.)Public Extension MethodRepeat()Overloaded. Repeats the observable sequence indefinitely. (Defined by Observable.)Public Extension MethodRepeat(Int32)Overloaded. Repeats the observable sequence indefinitely. (Defined by Observable.)Public Extension MethodReplay()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay(TimeSpan)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay(IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay(TimeSpan, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay(Int32, TimeSpan)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32, TimeSpan, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initial value. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, TimeSpan)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, TimeSpan, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, TimeSpan)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, TimeSpan, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodRetry()Overloaded. Repeats the source observable sequence until it successfully terminates. (Defined by Observable.)Public Extension MethodRetry(Int32)Overloaded. Repeats the source observable sequence until it successfully terminates. (Defined by Observable.)Public Extension MethodSample(TimeSpan)Overloaded. Samples the observable sequence at each interval. (Defined by Observable.)Public Extension MethodSample(TimeSpan, IScheduler)Overloaded. Samples the observable sequence at each interval with the specified source, interval and scheduler. (Defined by Observable.)Public Extension MethodSample<T, TSample>(IObservable)Overloaded. Samples the observable sequence at sampling ticks with the specified source and sampler. (Defined by Observable.)Public Extension MethodScan(Func<T, T, T>)Overloaded. Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator. (Defined by Observable.)Public Extension MethodScan<T, TAccumulate>(TAccumulate, Func<TAccumulate, T, TAccumulate>)Overloaded. Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source, seed and accumulator. (Defined by Observable.)Public Extension MethodSelect<T, TResult>(Func<T, TResult>)Overloaded. Projects each element of an observable sequence into a new form with the specified source and selector. (Defined by Observable.)Public Extension MethodSelect<T, TResult>(Func<T, Int32, TResult>)Overloaded. Projects each element of an observable sequence into a new form by incorporating the element’s index with the specified source and selector. (Defined by Observable.)Public Extension MethodSelectMany<T, TOther>(IObservable)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IObservable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IEnumerable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IObservable>, Func<Exception, IObservable>, Func<IObservable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TCollection, TResult>(Func<T, IEnumerable>, Func<T, TCollection, TResult>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TCollection, TResult>(Func<T, IObservable>, Func<T, TCollection, TResult>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSequenceEqual(IObservable)Overloaded. Determines whether two sequences are equal by comparing the elements pairwise. (Defined by Observable.)Public Extension MethodSequenceEqual(IObservable, IEqualityComparer)Overloaded. Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. (Defined by Observable.)Public Extension MethodSingle()Overloaded. Returns the only element of an observable sequence and throws an exception if there is not exactly one element in the observable sequence. (Defined by Observable.)Public Extension MethodSingle(Func<T, Boolean>)Overloaded. Returns the only element of an observable sequence that matches the predicate and throws an exception if there is not exactly one element in the observable sequence. (Defined by Observable.)Public Extension MethodSingleOrDefault()Overloaded. Returns the only element of an observable sequence, or a default value if the observable sequence is empty. (Defined by Observable.)Public Extension MethodSingleOrDefault(Func<T, Boolean>)Overloaded. Returns the only element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodSkipBypasses a specified number of values in an observable sequence and then returns the remaining values. (Defined by Observable.)Public Extension MethodSkipLastBypasses a specified number of elements at the end of an observable sequence. (Defined by Observable.)Public Extension MethodSkipUntil<T, TOther>Returns the values from the source observable sequence only after the other observable sequence produces a value. (Defined by Observable.)Public Extension MethodSkipWhile(Func<T, Boolean>)Overloaded. Bypasses values in an observable sequence as long as a specified condition is true and then returns the remaining values. (Defined by Observable.)Public Extension MethodSkipWhile(Func<T, Int32, Boolean>)Overloaded. Bypasses values in an observable sequence as long as a specified condition is true and then returns the remaining values. (Defined by Observable.)Public Extension MethodStartWith(array<T[])Overloaded. Prepends a sequence of values to an observable sequence with the specified source and values. (Defined by Observable.)Public Extension MethodStartWith(IScheduler, array<T[])Overloaded. Prepends a sequence of values to an observable sequence with the specified source, scheduler and values. (Defined by Observable.)Public Extension MethodSubscribe()Overloaded. Evaluates the observable sequence with a specified source. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action)Overloaded. Subscribes an element handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action)Overloaded. Subscribes an element handler and an exception handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action)Overloaded. Subscribes an element handler and a completion handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action, Action)Overloaded. Subscribes an element handler, an exception handler, and a completion handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribeOn(SynchronizationContext)Overloaded. Asynchronously subscribes and unsubscribes observers on the specified synchronization context. (Defined by Observable.)Public Extension MethodSubscribeOn(Control)Overloaded. (Defined by ControlObservable.)Public Extension MethodSubscribeOn(Dispatcher)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodSubscribeOn(DispatcherScheduler)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodSubscribeOn(IScheduler)Overloaded. Asynchronously subscribes and unsubscribes observers on the specified scheduler. (Defined by Observable.)Public Extension MethodSubscribeOnDispatcher(Defined by DispatcherObservable.)Public Extension MethodSynchronize()Overloaded. Synchronizes the observable sequence. (Defined by Observable.)Public Extension MethodSynchronize(Object)Overloaded. Synchronizes the observable sequence. (Defined by Observable.)Public Extension MethodTakeReturns a specified number of contiguous values from the start of an observable sequence. (Defined by Observable.)Public Extension MethodTakeLastReturns a specified number of contiguous elements from the end of an observable sequence. (Defined by Observable.)Public Extension MethodTakeUntil<T, TOther>Returns the values from the source observable sequence until the other observable sequence produces a value. (Defined by Observable.)Public Extension MethodTakeWhile(Func<T, Boolean>)Overloaded. Returns values from an observable sequence as long as a specified condition is true, and then skips the remaining values. (Defined by Observable.)Public Extension MethodTakeWhile(Func<T, Int32, Boolean>)Overloaded. Returns values from an observable sequence as long as a specified condition is true, and then skips the remaining values. (Defined by Observable.)Public Extension MethodThen<T, TResult>Matches when the observable sequence has an available value and projects the value. (Defined by Observable.)Public Extension MethodThrottle(TimeSpan)Overloaded. Ignores the values from an observable sequence which are followed by another value before due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodThrottle(TimeSpan, IScheduler)Overloaded. Ignores the values from an observable sequence which are followed by another value before due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodTimeInterval()Overloaded. Records the time interval between consecutive values in an observable sequence with the specified source. (Defined by Observable.)Public Extension MethodTimeInterval(IScheduler)Overloaded. Records the time interval between consecutive values in an observable sequence with the specified source and scheduler. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset)Overloaded. Returns either the observable sequence or a TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IObservable)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IObservable)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IScheduler)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IScheduler)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IObservable, IScheduler)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IObservable, IScheduler)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimestamp()Overloaded. Records the timestamp for each value in an observable sequence with the specified source. (Defined by Observable.)Public Extension MethodTimestamp(IScheduler)Overloaded. Records the timestamp for each value in an observable sequence with the specified source and scheduler. (Defined by Observable.)Public Extension MethodToArrayCreates an array from an observable sequence. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey>(Func<T, TKey>)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, and a comparer. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, and an element selector function. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, a comparer, and an element selector function. (Defined by Observable.)Public Extension MethodToEnumerableConverts an observable sequence to an enumerable sequence. (Defined by Observable.)Public Extension MethodToEventExposes an observable sequence as an object with a .NET event with a specified source. (Defined by Observable.)Public Extension MethodToListCreates a list from an observable sequence. (Defined by Observable.)Public Extension MethodToLookup<T, TKey>(Func<T, TKey>)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodToLookup<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, and a comparer. (Defined by Observable.)Public Extension MethodToLookup<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function. (Defined by Observable.)Public Extension MethodToLookup<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, a comparer, and an element selector function. (Defined by Observable.)Public Extension MethodToNotifierCreates a notification callback from an observer. (Defined by Observer.)Public Extension MethodToTask()Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(Object)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(CancellationToken)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(CancellationToken, Object)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodWhere(Func<T, Boolean>)Overloaded. Filters the elements of an observable sequence based on a predicate. (Defined by Observable.)Public Extension MethodWhere(Func<T, Int32, Boolean>)Overloaded. Filters the elements of an observable sequence based on a predicate by incorporating the element's index. (Defined by Observable.)Public Extension MethodWindow(Int32)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on element count information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(Int32, Int32)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on element count information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, IScheduler)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, TimeSpan)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, Int32)Overloaded. Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, TimeSpan, IScheduler)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, Int32, IScheduler)Overloaded. Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodWindow<T, TWindowClosing>(Func<IObservable>)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows. (Defined by Observable.)Public Extension MethodWindow<T, TWindowOpening, TWindowClosing>(IObservable, Func<TWindowOpening, IObservable>)Overloaded. Projects each element of an observable sequence into zero or more windows. (Defined by Observable.)Public Extension MethodZip<T, TSecond, TResult>(IObservable, Func<T, TSecond, TResult>)Overloaded. Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion. (Defined by Observable.)Public Extension MethodZip<T, TSecond, TResult>(IEnumerable, Func<T, TSecond, TResult>)Overloaded. Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function. (Defined by Observable.)Top

Remarks

A subject acts similar to a proxy. It performs as both a subscriber and a publisher. This is accomplished by supporting the IObserver and IObservable interfaces. The IObserver interface can be used to subscribe the subject to multiple streams or sequences of data. The data is then published through it's IObservable interface to all subscribed observers. Regular subjects do synchronize outgoing calls to subcribed observers using a scheduler.

Examples

This example demonstrates the use of the subject class. An instance of a Subject of the string type is used to subscribe to two example news feeds. These feeds just publish random news headlines at an interval no greater than five seconds apart. Two subscriptions against the subject’s observable interface are then created to receive the combined data stream. One subscription reports each item from the data stream as “all news”. The other subscription filters each headline in the stream to only report local headlines. The subscriptions both write each headline received to the console window. Processing terminates when the user presses the enter key and Dispose is called to cancel both subscriptions.

using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Concurrency;
using System.Threading;

namespace Example
{
  class Program
  {
    static void Main()
    {
      //*****************************************************************************************************//
      //***                                                                                               ***//
      //*** A subject acts similar to a proxy in that it acts as both a subscriber and a publisher        ***//
      //*** It's IObserver interface can be used to subscribe to multiple streams or sequences of data.   ***//
      //*** The data is then published through it's IObservable interface.                                ***//
      //***                                                                                               ***//
      //*** In this example a simple string based subject is used to subscribe to multiple news feeds     ***//
      //*** that provide random news headlines. Subscribers can then subscribe to the subject's           ***//
      //*** observable interface to observe the data stream(s) or a subset ofthe stream(s). Below we      ***//
      //*** subscribe the subject to two different news headline feeds. Then two subscriptions are        ***//
      //*** created: one for delivery of all news headlines, the other receives only local news headlines ***//
      //***                                                                                               ***//
      //*** A local news headline just contains the newsLocation substring ("in your area.").             ***//
      //***                                                                                               ***//
      //*****************************************************************************************************//

      Subject<string> mySubject = new Subject<string>();


      //*********************************************************//
      //*** Create news feed #1 and subscribe mySubject to it ***//
      //*********************************************************//
      NewsHeadlineFeed NewsFeed1 = new NewsHeadlineFeed("Headline News Feed #1");
      NewsFeed1.HeadlineFeed.Subscribe(mySubject);

      //*********************************************************//
      //*** Create news feed #2 and subscribe mySubject to it ***//
      //*********************************************************//
      NewsHeadlineFeed NewsFeed2 = new NewsHeadlineFeed("Headline News Feed #2");
      NewsFeed2.HeadlineFeed.Subscribe(mySubject);


      Console.WriteLine("Subscribing to news headline feeds.\n\nPress ENTER to exit.\n");

      //*****************************************************************************************************//
      //*** Create a subscription to the subject's observable sequence. This subscription will receive    ***//
      //*** all headlines.                                                                                ***//
      //*****************************************************************************************************//
      IDisposable allNewsSubscription = mySubject.Subscribe(x => 
      {
        Console.WriteLine("Subscription : All news subscription\n{0}\n", x);
      });


      //*****************************************************************************************************//
      //*** Create a subscription to the subject's observable sequence. This subscription will filter for ***//
      //*** only local headlines.                                                                         ***//
      //*****************************************************************************************************//

      IDisposable localNewsSubscription = mySubject.Where(x => x.Contains("in your area.")).Subscribe(x => 
      {
        Console.WriteLine("\n************************************\n" +
                          "***[ Local news headline report ]***\n" +
                          "************************************\n{0}\n\n", x);
      });

      Console.ReadLine();


      //*********************************//
      //*** Cancel both subscriptions ***//
      //*********************************//

      allNewsSubscription.Dispose();
      localNewsSubscription.Dispose();
    }
  }



  //*********************************************************************************//
  //*** The NewsHeadlineFeed class is just a mock news feed in the form of an     ***//
  //*** observable sequence in Reactive Extensions.                               ***//
  //*********************************************************************************//
  class NewsHeadlineFeed
  {
    private string feedName;                     // Feedname used to label the stream
    private IObservable<string> headlineFeed;    // The actual data stream
    private readonly Random rand = new Random(); // Used to stream random headlines.


    //*** A list of predefined news events to combine with a simple location string ***//
    static readonly string[] newsEvents = { "A tornado occurred ",
                                            "Weather watch for snow storm issued ",
                                            "A robbery occurred ",
                                            "We have a lottery winner ",
                                            "An earthquake occurred ",
                                            "Severe automobile accident "};

    //*** A list of predefined location strings to combine with a news event. ***//
    static readonly string[] newsLocations = { "in your area.",
                                               "in Dallas, Texas.",
                                               "somewhere in Iraq.",
                                               "Lincolnton, North Carolina",
                                               "Redmond, Washington"};

    public IObservable<string> HeadlineFeed
    {
      get { return headlineFeed; }
    }

    public NewsHeadlineFeed(string name)
    {
      feedName = name;

      //*****************************************************************************************//
      //*** Using the Generate operator to generate a continous stream of headline that occur ***//
      //*** randomly within 5 seconds.                                                        ***//
      //*****************************************************************************************//
      headlineFeed = Observable.Generate(RandNewsEvent(),
                                         evt => true,
                                         evt => RandNewsEvent(),
                                         evt => { Thread.Sleep(rand.Next(5000)); return evt; },
                                         Scheduler.ThreadPool);
    }


    //****************************************************************//
    //*** Some very simple formatting of the headline event string ***//
    //****************************************************************//
    private string RandNewsEvent()
    {
      return "Feedname     : " + feedName + "\nHeadline     : " + newsEvents[rand.Next(newsEvents.Length)] + 
             newsLocations[rand.Next(newsLocations.Length)];
    }
  }
}

The following output was generated with the example code.

Subscribing to news headline feeds.

Press ENTER to exit.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : A robbery occurred somewhere in Iraq.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : An earthquake occurred in Dallas, Texas.

Subscription : All news subscription
Feedname     : Headline News Feed #1
Headline     : We have a lottery winner in your area.

********************************** [ Local news headline report ] ********************************** Feedname : Headline News Feed #1 Headline : We have a lottery winner in your area.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : Severe automobile accident Redmond, Washington

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : We have a lottery winner in Dallas, Texas.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : An earthquake occurred in Dallas, Texas.

Subscription : All news subscription
Feedname     : Headline News Feed #1
Headline     : We have a lottery winner somewhere in Iraq.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : Severe automobile accident somewhere in Iraq.

Subscription : All news subscription
Feedname     : Headline News Feed #2
Headline     : An earthquake occurred in your area.

********************************** [ Local news headline report ] ********************************** Feedname : Headline News Feed #2 Headline : An earthquake occurred in your area.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive.Subjects Namespace

Subject<T> Constructor

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

Namespace:  System.Reactive.Subjects
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Subject()
public Subject()
public:
Subject()
new : unit -> Subject
public function Subject()

Remarks

Creates a new instance of subject of type T

Examples

using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Concurrency;
using System.Threading;

namespace Example
{
  class Program
  {
    static void Main()
    {
      //*****************************************************************************************************//
      //***                                                                                               ***//
      //*** A subject acts similar to a proxy in that it acts as both a subscriber and a publisher        ***//
      //*** It's IObserver interface can be used to subscribe to multiple streams or sequences of data.   ***//
      //*** The data is then published through it's IObservable interface.                                ***//
      //***                                                                                               ***//
      //*** In this example a simple string based subject is used to subscribe to multiple news feeds     ***//
      //*** that provide random news headlines. Subscribers can then subscribe to the subject's           ***//
      //*** observable interface to observe the data stream(s) or a subset ofthe stream(s). Below we      ***//
      //*** subscribe the subject to two different news headline feeds. Then two subscriptions are        ***//
      //*** created: one for delivery of all news headlines, the other receives only local news headlines ***//
      //***                                                                                               ***//
      //*** A local news headline just contains the newsLocation substring ("in your area.").             ***//
      //***                                                                                               ***//
      //*****************************************************************************************************//

      Subject<string> mySubject = new Subject<string>();


      //*********************************************************//
      //*** Create news feed #1 and subscribe mySubject to it ***//
      //*********************************************************//
      NewsHeadlineFeed NewsFeed1 = new NewsHeadlineFeed("Headline News Feed #1");
      NewsFeed1.HeadlineFeed.Subscribe(mySubject);

      //*********************************************************//
      //*** Create news feed #2 and subscribe mySubject to it ***//
      //*********************************************************//
      NewsHeadlineFeed NewsFeed2 = new NewsHeadlineFeed("Headline News Feed #2");
      NewsFeed2.HeadlineFeed.Subscribe(mySubject);


      Console.WriteLine("Subscribing to news headline feeds.\n\nPress ENTER to exit.\n");

      //*****************************************************************************************************//
      //*** Create a subscription to the subject's observable sequence. This subscription will receive    ***//
      //*** all headlines.                                                                                ***//
      //*****************************************************************************************************//
      IDisposable allNewsSubscription = mySubject.Subscribe(x => 
      {
        Console.WriteLine("Subscription : All news subscription\n{0}\n", x);
      });


      //*****************************************************************************************************//
      //*** Create a subscription to the subject's observable sequence. This subscription will filter for ***//
      //*** only local headlines.                                                                         ***//
      //*****************************************************************************************************//

      IDisposable localNewsSubscription = mySubject.Where(x => x.Contains("in your area.")).Subscribe(x => 
      {
        Console.WriteLine("\n************************************\n" +
                          "***[ Local news headline report ]***\n" +
                          "************************************\n{0}\n\n", x);
      });

      Console.ReadLine();


      //*********************************//
      //*** Cancel both subscriptions ***//
      //*********************************//

      allNewsSubscription.Dispose();
      localNewsSubscription.Dispose();
    }
  }



  //*********************************************************************************//
  //*** The NewsHeadlineFeed class is just a mock news feed in the form of an     ***//
  //*** observable sequence in Reactive Extensions.                               ***//
  //*********************************************************************************//
  class NewsHeadlineFeed
  {
    private string feedName;                     // Feedname used to label the stream
    private IObservable<string> headlineFeed;    // The actual data stream
    private readonly Random rand = new Random(); // Used to stream random headlines.


    //*** A list of predefined news events to combine with a simple location string ***//
    static readonly string[] newsEvents = { "A tornado occurred ",
                                            "Weather watch for snow storm issued ",
                                            "A robbery occurred ",
                                            "We have a lottery winner ",
                                            "An earthquake occurred ",
                                            "Severe automobile accident "};

    //*** A list of predefined location strings to combine with a news event. ***//
    static readonly string[] newsLocations = { "in your area.",
                                               "in Dallas, Texas.",
                                               "somewhere in Iraq.",
                                               "Lincolnton, North Carolina",
                                               "Redmond, Washington"};

    public IObservable<string> HeadlineFeed
    {
      get { return headlineFeed; }
    }

    public NewsHeadlineFeed(string name)
    {
      feedName = name;

      //*****************************************************************************************//
      //*** Using the Generate operator to generate a continous stream of headline that occur ***//
      //*** randomly within 5 seconds.                                                        ***//
      //*****************************************************************************************//
      headlineFeed = Observable.Generate(RandNewsEvent(),
                                         evt => true,
                                         evt => RandNewsEvent(),
                                         evt => { Thread.Sleep(rand.Next(5000)); return evt; },
                                         Scheduler.ThreadPool);
    }


    //****************************************************************//
    //*** Some very simple formatting of the headline event string ***//
    //****************************************************************//
    private string RandNewsEvent()
    {
      return "Feedname     : " + feedName + "\nHeadline     : " + newsEvents[rand.Next(newsEvents.Length)] + 
             newsLocations[rand.Next(newsLocations.Length)];
    }
  }
}

See Also

Reference

Subject<T> Class

System.Reactive.Subjects Namespace

Subject<T> Methods

Include Protected Members
Include Inherited Members

The Subject<T> type exposes the following members.

Methods

NameDescriptionPublic methodDisposeReleases all resources used by the current instance of the Subject class and unsubscribe all observersPublic methodEquals(Inherited from Object.)Protected methodFinalize(Inherited from Object.)Public methodGetHashCode(Inherited from Object.)Public methodGetType(Inherited from Object.)Protected methodMemberwiseClone(Inherited from Object.)Public methodOnCompletedNotifies all subscribed observers of the end of the sequence.Public methodOnErrorNotifies all subscribed observers with the exception.Public methodOnNextNotifies all subscribed observers with the value.Public methodSubscribeSubscribes an observer to the subject.Public methodToString(Inherited from Object.)Top

Extension Methods

NameDescriptionPublic Extension MethodAggregate(Func<T, T, T>)Overloaded. Applies an accumulator function over an observable sequence. (Defined by Observable.)Public Extension MethodAggregate<T, TAccumulate>(TAccumulate, Func<TAccumulate, T, TAccumulate>)Overloaded. Applies an accumulator function over an observable sequence with the specified seed value. (Defined by Observable.)Public Extension MethodAllDetermines whether all elements of an observable sequence satisfies a condition. (Defined by Observable.)Public Extension MethodAmbPropagates the observable sequence that reacts first with the specified first and second sequence. (Defined by Observable.)Public Extension MethodAnd<T, TRight>Matches when both observable sequences have an available value. (Defined by Observable.)Public Extension MethodAny()Overloaded. Determines whether an observable sequence contains any elements. (Defined by Observable.)Public Extension MethodAny(Func<T, Boolean>)Overloaded. Determines whether all elements of an observable sequence satisfies a condition. (Defined by Observable.)Public Extension MethodAsObservableHides the identity of an observable sequence. (Defined by Observable.)Public Extension MethodAsObserverHides the identity of an observer. (Defined by Observer.)Public Extension MethodAsQbservableConverts an observable sequence into a queryable observable sequence. (Defined by Qbservable.)Public Extension MethodAssertEqual(Defined by Extensions.)Public Extension MethodBuffer(Int32)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on element count information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(Int32, Int32)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on element count information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, IScheduler)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, TimeSpan)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, Int32)Overloaded. Indicates each element of an observable sequence into a buffer that’s sent out when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, TimeSpan, IScheduler)Overloaded. Indicates each element of an observable sequence into zero or more buffers which are produced based on timing information. (Defined by Observable.)Public Extension MethodBuffer(TimeSpan, Int32, IScheduler)Overloaded. Indicates each element of an observable sequence into a buffer that’s sent out when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodBuffer<T, TBufferClosing>(Func<IObservable>)Overloaded. Indicates each element of an observable sequence into consecutive non-overlapping buffers. (Defined by Observable.)Public Extension MethodBuffer<T, TBufferOpening, TBufferClosing>(IObservable, Func<TBufferOpening, IObservable>)Overloaded. Indicates each element of a queryable observable sequence into consecutive non-overlapping buffers. (Defined by Observable.)Public Extension MethodCatch(IObservable)Overloaded. Continues an observable sequence that is terminated by an exception with the next observable sequence. (Defined by Observable.)Public Extension MethodCatch<T, TException>(Func<TException, IObservable>)Overloaded. Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler. (Defined by Observable.)Public Extension MethodCombineLatest<T, TSecond, TResult>Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element. (Defined by Observable.)Public Extension MethodConcatConcatenates two observable sequences. (Defined by Observable.)Public Extension MethodContains(T)Overloaded. Determines whether an observable sequence contains a specified element by using the default equality comparer. (Defined by Observable.)Public Extension MethodContains(T, IEqualityComparer)Overloaded. Determines whether an observable sequence contains a specified element by using a specified System.Collections.Generic.IEqualityComparer<T>. (Defined by Observable.)Public Extension MethodCountReturns a Int32 that represents the total number of elements in an observable sequence. (Defined by Observable.)Public Extension MethodDefaultIfEmpty()Overloaded. Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. (Defined by Observable.)Public Extension MethodDefaultIfEmpty(T)Overloaded. Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. (Defined by Observable.)Public Extension MethodDelay(TimeSpan)Overloaded. Indicates the observable sequence by due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodDelay(DateTimeOffset)Overloaded. Indicates the observable sequence by due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodDelay(TimeSpan, IScheduler)Overloaded. Indicates the observable sequence by due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodDelay(DateTimeOffset, IScheduler)Overloaded. Indicates the observable sequence by due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodDistinct()Overloaded. Returns an observable sequence that contains only distinct elements with a specified source. (Defined by Observable.)Public Extension MethodDistinct(IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct elements according to the comparer. (Defined by Observable.)Public Extension MethodDistinct<T, TKey>(Func<T, TKey>)Overloaded. Returns an observable sequence that contains only distinct elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinct<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinctUntilChanged()Overloaded. Returns an observable sequence that contains only distinct contiguous elements with a specified source. (Defined by Observable.)Public Extension MethodDistinctUntilChanged(IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the comparer. (Defined by Observable.)Public Extension MethodDistinctUntilChanged<T, TKey>(Func<T, TKey>)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the keySelector. (Defined by Observable.)Public Extension MethodDistinctUntilChanged<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. (Defined by Observable.)Public Extension MethodDo(Action)Overloaded. Invokes an action for each element in the observable sequence. (Defined by Observable.)Public Extension MethodDo(IObserver)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon graceful termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action)Overloaded. Invokes an action for each element in the observable sequence and invokes an action upon exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodDo(Action, Action, Action)Overloaded. Invokes an action for each element in the observable sequence, and invokes an action upon graceful or exceptional termination of the observable sequence. (Defined by Observable.)Public Extension MethodElementAtReturns the element at a specified index in a sequence. (Defined by Observable.)Public Extension MethodElementAtOrDefaultReturns the element at a specified index in a sequence or a default value if the index is out of range. (Defined by Observable.)Public Extension MethodFinallyInvokes a specified action after source observable sequence terminates normally or by an exception. (Defined by Observable.)Public Extension MethodFirst()Overloaded. Returns the first element of an observable sequence with a specified source. (Defined by Observable.)Public Extension MethodFirst(Func<T, Boolean>)Overloaded. Returns the first element of an observable sequence that matches the predicate. (Defined by Observable.)Public Extension MethodFirstOrDefault()Overloaded. Returns the first element of an observable sequence, or a default value if no value is found. (Defined by Observable.)Public Extension MethodFirstOrDefault(Func<T, Boolean>)Overloaded. Returns the first element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodFoo<T, R>(Defined by MyExt.)Public Extension MethodForEachInvokes an action for each element in the observable sequence, and blocks until the sequence is terminated. (Defined by Observable.)Public Extension MethodGetEnumeratorReturns an enumerator that enumerates all values of the observable sequence. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey>(Func<T, TKey>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Groups the elements of an observable sequence and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupBy<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TDuration>(Func<T, TKey>, Func<IGroupedObservable<TKey, T>, IObservable>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TDuration>(Func<T, TKey>, Func<IGroupedObservable<TKey, T>, IObservable>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TElement, TDuration>(Func<T, TKey>, Func<T, TElement>, Func<IGroupedObservable<TKey, TElement>, IObservable>)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupByUntil<T, TKey, TElement, TDuration>(Func<T, TKey>, Func<T, TElement>, Func<IGroupedObservable<TKey, TElement>, IObservable>, IEqualityComparer)Overloaded. Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. (Defined by Observable.)Public Extension MethodGroupJoin<T, TRight, TLeftDuration, TRightDuration, TResult>Correlates the elements of two sequences based on overlapping durations, and groups the results. (Defined by Observable.)Public Extension MethodIgnoreElementsIgnores all values in an observable sequence leaving only the termination messages. (Defined by Observable.)Public Extension MethodJoin<T, TRight, TLeftDuration, TRightDuration, TResult>Correlates the elements of two sequences based on overlapping durations. (Defined by Observable.)Public Extension MethodLast()Overloaded. Returns the last element of an observable sequence with a specified source. (Defined by Observable.)Public Extension MethodLast(Func<T, Boolean>)Overloaded. Returns the last element of an observable sequence that matches the predicate. (Defined by Observable.)Public Extension MethodLastOrDefault()Overloaded. Returns last element in the observable sequence, or a default value if no value is found. (Defined by Observable.)Public Extension MethodLastOrDefault(Func<T, Boolean>)Overloaded. Returns the last element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodLatestSamples the most recent value in an observable sequence. (Defined by Observable.)Public Extension MethodLongCountReturns a Int64 that represents the total number of elements in an observable sequence. (Defined by Observable.)Public Extension MethodMaterializeMaterializes the implicit notifications of an observable sequence as explicit notification values. (Defined by Observable.)Public Extension MethodMax()Overloaded. Returns the maximum element in an observable sequence. (Defined by Observable.)Public Extension MethodMax(IComparer)Overloaded. Returns the maximum value in an observable sequence according to the specified comparer. (Defined by Observable.)Public Extension MethodMaxBy<T, TKey>(Func<T, TKey>)Overloaded. Returns the elements in an observable sequence with the maximum key value. (Defined by Observable.)Public Extension MethodMaxBy<T, TKey>(Func<T, TKey>, IComparer)Overloaded. Returns the elements in an observable sequence with the maximum key value. (Defined by Observable.)Public Extension MethodMerge(IObservable)Overloaded. Merges an observable sequence of observable sequences into an observable sequence. (Defined by Observable.)Public Extension MethodMerge(IObservable, IScheduler)Overloaded. Merges two observable sequences into a single observable sequence. (Defined by Observable.)Public Extension MethodMin()Overloaded. Returns the minimum element in an observable sequence. (Defined by Observable.)Public Extension MethodMin(IComparer)Overloaded. Returns the minimum value in an observable sequence according to the specified comparer. (Defined by Observable.)Public Extension MethodMinBy<T, TKey>(Func<T, TKey>)Overloaded. Returns the elements in an observable sequence with the minimum key value. (Defined by Observable.)Public Extension MethodMinBy<T, TKey>(Func<T, TKey>, IComparer)Overloaded. Returns the elements in an observable sequence with the minimum key value according to the specified comparer. (Defined by Observable.)Public Extension MethodMostRecentSamples the most recent value in an observable sequence. (Defined by Observable.)Public Extension MethodMulticast<T, TResult>(ISubject<T, TResult>)Overloaded. Returns a connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. (Defined by Observable.)Public Extension MethodMulticast<T, TIntermediate, TResult>(Func<ISubject<T, TIntermediate>>, Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. (Defined by Observable.)Public Extension MethodNextSamples the next value (blocking without buffering) from in an observable sequence. (Defined by Observable.)Public Extension MethodObserveOn(SynchronizationContext)Overloaded. Asynchronously notify observers on the specified synchronization context. (Defined by Observable.)Public Extension MethodObserveOn(Control)Overloaded. (Defined by ControlObservable.)Public Extension MethodObserveOn(Dispatcher)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodObserveOn(DispatcherScheduler)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodObserveOn(IScheduler)Overloaded. Asynchronously notify observers on the specified scheduler. (Defined by Observable.)Public Extension MethodObserveOnDispatcher(Defined by DispatcherObservable.)Public Extension MethodOnErrorResumeNextContinues an observable sequence that is terminated normally or by an exception with the next observable sequence. (Defined by Observable.)Public Extension MethodPublish()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence. (Defined by Observable.)Public Extension MethodPublish(T)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. (Defined by Observable.)Public Extension MethodPublish<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence. (Defined by Observable.)Public Extension MethodPublish<T, TResult>(Func<IObservable, IObservable>, T)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. (Defined by Observable.)Public Extension MethodPublishLast()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. (Defined by Observable.)Public Extension MethodPublishLast<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. (Defined by Observable.)Public Extension MethodRepeat()Overloaded. Repeats the observable sequence indefinitely. (Defined by Observable.)Public Extension MethodRepeat(Int32)Overloaded. Repeats the observable sequence indefinitely. (Defined by Observable.)Public Extension MethodReplay()Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay(TimeSpan)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay(IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay(TimeSpan, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay(Int32, TimeSpan)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay(Int32, TimeSpan, IScheduler)Overloaded. Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initial value. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, TimeSpan)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, TimeSpan, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying all notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, TimeSpan)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodReplay<T, TResult>(Func<IObservable, IObservable>, Int32, TimeSpan, IScheduler)Overloaded. Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize notifications within window. (Defined by Observable.)Public Extension MethodRetry()Overloaded. Repeats the source observable sequence until it successfully terminates. (Defined by Observable.)Public Extension MethodRetry(Int32)Overloaded. Repeats the source observable sequence until it successfully terminates. (Defined by Observable.)Public Extension MethodSample(TimeSpan)Overloaded. Samples the observable sequence at each interval. (Defined by Observable.)Public Extension MethodSample(TimeSpan, IScheduler)Overloaded. Samples the observable sequence at each interval with the specified source, interval and scheduler. (Defined by Observable.)Public Extension MethodSample<T, TSample>(IObservable)Overloaded. Samples the observable sequence at sampling ticks with the specified source and sampler. (Defined by Observable.)Public Extension MethodScan(Func<T, T, T>)Overloaded. Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source and accumulator. (Defined by Observable.)Public Extension MethodScan<T, TAccumulate>(TAccumulate, Func<TAccumulate, T, TAccumulate>)Overloaded. Applies an accumulator function over an observable sequence and returns each intermediate result with the specified source, seed and accumulator. (Defined by Observable.)Public Extension MethodSelect<T, TResult>(Func<T, TResult>)Overloaded. Projects each element of an observable sequence into a new form with the specified source and selector. (Defined by Observable.)Public Extension MethodSelect<T, TResult>(Func<T, Int32, TResult>)Overloaded. Projects each element of an observable sequence into a new form by incorporating the element’s index with the specified source and selector. (Defined by Observable.)Public Extension MethodSelectMany<T, TOther>(IObservable)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IObservable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IEnumerable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TResult>(Func<T, IObservable>, Func<Exception, IObservable>, Func<IObservable>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TCollection, TResult>(Func<T, IEnumerable>, Func<T, TCollection, TResult>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSelectMany<T, TCollection, TResult>(Func<T, IObservable>, Func<T, TCollection, TResult>)Overloaded. Projects each element of an observable sequence to an observable sequence and flattens the resulting observable sequences into one observable sequence. (Defined by Observable.)Public Extension MethodSequenceEqual(IObservable)Overloaded. Determines whether two sequences are equal by comparing the elements pairwise. (Defined by Observable.)Public Extension MethodSequenceEqual(IObservable, IEqualityComparer)Overloaded. Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. (Defined by Observable.)Public Extension MethodSingle()Overloaded. Returns the only element of an observable sequence and throws an exception if there is not exactly one element in the observable sequence. (Defined by Observable.)Public Extension MethodSingle(Func<T, Boolean>)Overloaded. Returns the only element of an observable sequence that matches the predicate and throws an exception if there is not exactly one element in the observable sequence. (Defined by Observable.)Public Extension MethodSingleOrDefault()Overloaded. Returns the only element of an observable sequence, or a default value if the observable sequence is empty. (Defined by Observable.)Public Extension MethodSingleOrDefault(Func<T, Boolean>)Overloaded. Returns the only element of an observable sequence that matches the predicate, or a default value if no value is found. (Defined by Observable.)Public Extension MethodSkipBypasses a specified number of values in an observable sequence and then returns the remaining values. (Defined by Observable.)Public Extension MethodSkipLastBypasses a specified number of elements at the end of an observable sequence. (Defined by Observable.)Public Extension MethodSkipUntil<T, TOther>Returns the values from the source observable sequence only after the other observable sequence produces a value. (Defined by Observable.)Public Extension MethodSkipWhile(Func<T, Boolean>)Overloaded. Bypasses values in an observable sequence as long as a specified condition is true and then returns the remaining values. (Defined by Observable.)Public Extension MethodSkipWhile(Func<T, Int32, Boolean>)Overloaded. Bypasses values in an observable sequence as long as a specified condition is true and then returns the remaining values. (Defined by Observable.)Public Extension MethodStartWith(array<T[])Overloaded. Prepends a sequence of values to an observable sequence with the specified source and values. (Defined by Observable.)Public Extension MethodStartWith(IScheduler, array<T[])Overloaded. Prepends a sequence of values to an observable sequence with the specified source, scheduler and values. (Defined by Observable.)Public Extension MethodSubscribe()Overloaded. Evaluates the observable sequence with a specified source. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action)Overloaded. Subscribes an element handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action)Overloaded. Subscribes an element handler and an exception handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action)Overloaded. Subscribes an element handler and a completion handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribe(Action, Action, Action)Overloaded. Subscribes an element handler, an exception handler, and a completion handler to an observable sequence. (Defined by ObservableExtensions.)Public Extension MethodSubscribeOn(SynchronizationContext)Overloaded. Asynchronously subscribes and unsubscribes observers on the specified synchronization context. (Defined by Observable.)Public Extension MethodSubscribeOn(Control)Overloaded. (Defined by ControlObservable.)Public Extension MethodSubscribeOn(Dispatcher)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodSubscribeOn(DispatcherScheduler)Overloaded. (Defined by DispatcherObservable.)Public Extension MethodSubscribeOn(IScheduler)Overloaded. Asynchronously subscribes and unsubscribes observers on the specified scheduler. (Defined by Observable.)Public Extension MethodSubscribeOnDispatcher(Defined by DispatcherObservable.)Public Extension MethodSynchronize()Overloaded. Synchronizes the observable sequence. (Defined by Observable.)Public Extension MethodSynchronize(Object)Overloaded. Synchronizes the observable sequence. (Defined by Observable.)Public Extension MethodTakeReturns a specified number of contiguous values from the start of an observable sequence. (Defined by Observable.)Public Extension MethodTakeLastReturns a specified number of contiguous elements from the end of an observable sequence. (Defined by Observable.)Public Extension MethodTakeUntil<T, TOther>Returns the values from the source observable sequence until the other observable sequence produces a value. (Defined by Observable.)Public Extension MethodTakeWhile(Func<T, Boolean>)Overloaded. Returns values from an observable sequence as long as a specified condition is true, and then skips the remaining values. (Defined by Observable.)Public Extension MethodTakeWhile(Func<T, Int32, Boolean>)Overloaded. Returns values from an observable sequence as long as a specified condition is true, and then skips the remaining values. (Defined by Observable.)Public Extension MethodThen<T, TResult>Matches when the observable sequence has an available value and projects the value. (Defined by Observable.)Public Extension MethodThrottle(TimeSpan)Overloaded. Ignores the values from an observable sequence which are followed by another value before due time with the specified source and dueTime. (Defined by Observable.)Public Extension MethodThrottle(TimeSpan, IScheduler)Overloaded. Ignores the values from an observable sequence which are followed by another value before due time with the specified source, dueTime and scheduler. (Defined by Observable.)Public Extension MethodTimeInterval()Overloaded. Records the time interval between consecutive values in an observable sequence with the specified source. (Defined by Observable.)Public Extension MethodTimeInterval(IScheduler)Overloaded. Records the time interval between consecutive values in an observable sequence with the specified source and scheduler. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset)Overloaded. Returns either the observable sequence or a TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IObservable)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IObservable)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IScheduler)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IScheduler)Overloaded. Returns either the observable sequence or an TimeoutException if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(TimeSpan, IObservable, IScheduler)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimeout(DateTimeOffset, IObservable, IScheduler)Overloaded. Returns the source observable sequence or the other observable sequence if dueTime elapses. (Defined by Observable.)Public Extension MethodTimestamp()Overloaded. Records the timestamp for each value in an observable sequence with the specified source. (Defined by Observable.)Public Extension MethodTimestamp(IScheduler)Overloaded. Records the timestamp for each value in an observable sequence with the specified source and scheduler. (Defined by Observable.)Public Extension MethodToArrayCreates an array from an observable sequence. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey>(Func<T, TKey>)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, and a comparer. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, and an element selector function. (Defined by Observable.)Public Extension MethodToDictionary<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Creates a dictionary from an observable sequence according to a specified key selector function, a comparer, and an element selector function. (Defined by Observable.)Public Extension MethodToEnumerableConverts an observable sequence to an enumerable sequence. (Defined by Observable.)Public Extension MethodToEventExposes an observable sequence as an object with a .NET event with a specified source. (Defined by Observable.)Public Extension MethodToListCreates a list from an observable sequence. (Defined by Observable.)Public Extension MethodToLookup<T, TKey>(Func<T, TKey>)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function. (Defined by Observable.)Public Extension MethodToLookup<T, TKey>(Func<T, TKey>, IEqualityComparer)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, and a comparer. (Defined by Observable.)Public Extension MethodToLookup<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function. (Defined by Observable.)Public Extension MethodToLookup<T, TKey, TElement>(Func<T, TKey>, Func<T, TElement>, IEqualityComparer)Overloaded. Creates a lookup from an observable sequence according to a specified key selector function, a comparer, and an element selector function. (Defined by Observable.)Public Extension MethodToNotifierCreates a notification callback from an observer. (Defined by Observer.)Public Extension MethodToTask()Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(Object)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(CancellationToken)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodToTask(CancellationToken, Object)Overloaded. Returns a task that contains the last value of the observable sequence. (Defined by TaskObservableExtensions.)Public Extension MethodWhere(Func<T, Boolean>)Overloaded. Filters the elements of an observable sequence based on a predicate. (Defined by Observable.)Public Extension MethodWhere(Func<T, Int32, Boolean>)Overloaded. Filters the elements of an observable sequence based on a predicate by incorporating the element's index. (Defined by Observable.)Public Extension MethodWindow(Int32)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on element count information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(Int32, Int32)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on element count information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, IScheduler)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, TimeSpan)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, Int32)Overloaded. Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, TimeSpan, IScheduler)Overloaded. Projects each element of an observable sequence into zero or more windows which are produced based on timing information. (Defined by Observable.)Public Extension MethodWindow(TimeSpan, Int32, IScheduler)Overloaded. Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. (Defined by Observable.)Public Extension MethodWindow<T, TWindowClosing>(Func<IObservable>)Overloaded. Projects each element of an observable sequence into consecutive non-overlapping windows. (Defined by Observable.)Public Extension MethodWindow<T, TWindowOpening, TWindowClosing>(IObservable, Func<TWindowOpening, IObservable>)Overloaded. Projects each element of an observable sequence into zero or more windows. (Defined by Observable.)Public Extension MethodZip<T, TSecond, TResult>(IObservable, Func<T, TSecond, TResult>)Overloaded. Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion. (Defined by Observable.)Public Extension MethodZip<T, TSecond, TResult>(IEnumerable, Func<T, TSecond, TResult>)Overloaded. Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function. (Defined by Observable.)Top

See Also

Reference

Subject<T> Class

System.Reactive.Subjects Namespace