Targeting System 2.0.0
Plugin for multipurpose targeting and visual effects.
UniRx.Notification< T > Class Template Referenceabstract

Represents a notification to an observer. More...

Inheritance diagram for UniRx.Notification< T >:

Classes

class  OnCompletedNotification
 Represents an OnCompleted notification to an observer.
 
class  OnErrorNotification
 Represents an OnError notification to an observer.
 
class  OnNextNotification
 Represents an OnNext notification to an observer.
 

Public Member Functions

abstract bool Equals (Notification< T > other)
 Determines whether the current Notification<T> object has the same observer message payload as a specified Notification<T> value. More...
 
override bool Equals (object obj)
 Determines whether the specified System.Object is equal to the current Notification<T>. More...
 
abstract void Accept (IObserver< T > observer)
 Invokes the observer's method corresponding to the notification. More...
 
abstract TResult Accept< TResult > (IObserver< T, TResult > observer)
 Invokes the observer's method corresponding to the notification and returns the produced result. More...
 
abstract void Accept (Action< T > onNext, Action< Exception > onError, Action onCompleted)
 Invokes the delegate corresponding to the notification. More...
 
abstract TResult Accept< TResult > (Func< T, TResult > onNext, Func< Exception, TResult > onError, Func< TResult > onCompleted)
 Invokes the delegate corresponding to the notification and returns the produced result. More...
 
IObservable< T > ToObservable ()
 Returns an observable sequence with a single notification, using the immediate scheduler. More...
 
IObservable< T > ToObservable (IScheduler scheduler)
 Returns an observable sequence with a single notification. More...
 

Static Public Member Functions

static bool operator== (Notification< T > left, Notification< T > right)
 Determines whether the two specified Notification<T> objects have the same observer message payload. More...
 
static bool operator!= (Notification< T > left, Notification< T > right)
 Determines whether the two specified Notification<T> objects have a different observer message payload. More...
 
static Notification< T > CreateOnNext< T > (T value)
 Creates an object that represents an OnNext notification to an observer. More...
 
static Notification< T > CreateOnError< T > (Exception error)
 Creates an object that represents an OnError notification to an observer. More...
 
static Notification< T > CreateOnCompleted< T > ()
 Creates an object that represents an OnCompleted notification to an observer. More...
 

Properties

abstract T Value [get]
 Returns the value of an OnNext notification or throws an exception.
 
abstract bool HasValue [get]
 Returns a value that indicates whether the notification has a value.
 
abstract Exception Exception [get]
 Returns the exception of an OnError notification or returns null.
 
abstract NotificationKind Kind [get]
 Gets the kind of notification that is represented.
 

Detailed Description

Represents a notification to an observer.

Provides a set of static methods for constructing notifications.

Template Parameters
TThe type of the elements received by the observer.

Member Function Documentation

◆ Accept() [1/2]

abstract void UniRx.Notification< T >.Accept ( Action< T >  onNext,
Action< Exception onError,
Action  onCompleted 
)
pure virtual

Invokes the delegate corresponding to the notification.

Parameters
onNextDelegate to invoke for an OnNext notification.
onErrorDelegate to invoke for an OnError notification.
onCompletedDelegate to invoke for an OnCompleted notification.

◆ Accept() [2/2]

abstract void UniRx.Notification< T >.Accept ( IObserver< T >  observer)
pure virtual

Invokes the observer's method corresponding to the notification.

Parameters
observerObserver to invoke the notification on.

◆ Accept< TResult >() [1/2]

abstract TResult UniRx.Notification< T >.Accept< TResult > ( Func< T, TResult >  onNext,
Func< Exception, TResult >  onError,
Func< TResult >  onCompleted 
)
pure virtual

Invokes the delegate corresponding to the notification and returns the produced result.

Template Parameters
TResultThe type of the result returned from the notification handler delegates.
Parameters
onNextDelegate to invoke for an OnNext notification.
onErrorDelegate to invoke for an OnError notification.
onCompletedDelegate to invoke for an OnCompleted notification.
Returns
Result produced by the observation.

◆ Accept< TResult >() [2/2]

abstract TResult UniRx.Notification< T >.Accept< TResult > ( IObserver< T, TResult >  observer)
pure virtual

Invokes the observer's method corresponding to the notification and returns the produced result.

Template Parameters
TResultThe type of the result returned from the observer's notification handlers.
Parameters
observerObserver to invoke the notification on.
Returns
Result produced by the observation.

◆ CreateOnCompleted< T >()

static Notification< T > UniRx.Notification< T >.CreateOnCompleted< T > ( )
static

Creates an object that represents an OnCompleted notification to an observer.

Template Parameters
TThe type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence.
Returns
The OnCompleted notification.

◆ CreateOnError< T >()

static Notification< T > UniRx.Notification< T >.CreateOnError< T > ( Exception  error)
static

Creates an object that represents an OnError notification to an observer.

Template Parameters
TThe type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence.
Parameters
errorThe exception contained in the notification.
Returns
The OnError notification containing the exception.
Exceptions
ArgumentNullExceptionerror is null.

◆ CreateOnNext< T >()

static Notification< T > UniRx.Notification< T >.CreateOnNext< T > ( value)
static

Creates an object that represents an OnNext notification to an observer.

Template Parameters
TThe type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence.
Parameters
valueThe value contained in the notification.
Returns
The OnNext notification containing the value.

◆ Equals() [1/2]

abstract bool UniRx.Notification< T >.Equals ( Notification< T >  other)
pure virtual

Determines whether the current Notification<T> object has the same observer message payload as a specified Notification<T> value.

Parameters
otherAn object to compare to the current Notification<T> object.
Returns
true if both Notification<T> objects have the same observer message payload; otherwise, false.

Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead.

◆ Equals() [2/2]

override bool UniRx.Notification< T >.Equals ( object  obj)

Determines whether the specified System.Object is equal to the current Notification<T>.

Parameters
objThe System.Object to compare with the current Notification<T>.
Returns
true if the specified System.Object is equal to the current Notification<T>; otherwise, false.

Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead.

◆ operator!=()

static bool UniRx.Notification< T >.operator!= ( Notification< T >  left,
Notification< T >  right 
)
static

Determines whether the two specified Notification<T> objects have a different observer message payload.

Parameters
leftThe first Notification<T> to compare, or null.
rightThe second Notification<T> to compare, or null.
Returns
true if the first Notification<T> value has a different observer message payload as the second Notification<T> value; otherwise, false.

Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification<T> objects represent a different observer method call, use Object.ReferenceEquals identity equality instead.

◆ operator==()

static bool UniRx.Notification< T >.operator== ( Notification< T >  left,
Notification< T >  right 
)
static

Determines whether the two specified Notification<T> objects have the same observer message payload.

Parameters
leftThe first Notification<T> to compare, or null.
rightThe second Notification<T> to compare, or null.
Returns
true if the first Notification<T> value has the same observer message payload as the second Notification<T> value; otherwise, false.

Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead.

◆ ToObservable() [1/2]

IObservable< T > UniRx.Notification< T >.ToObservable ( )

Returns an observable sequence with a single notification, using the immediate scheduler.

Returns
The observable sequence that surfaces the behavior of the notification upon subscription.

◆ ToObservable() [2/2]

IObservable< T > UniRx.Notification< T >.ToObservable ( IScheduler  scheduler)

Returns an observable sequence with a single notification.

Parameters
schedulerScheduler to send out the notification calls on.
Returns
The observable sequence that surfaces the behavior of the notification upon subscription.

The documentation for this class was generated from the following file: