Notification
Provides a set of static methods for constructing notifications.
using System.Runtime.CompilerServices;
namespace System.Reactive
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public static class Notification
{
public static Notification<T> CreateOnNext<[System.Runtime.CompilerServices.Nullable(2)] T>(T value)
{
return new Notification<T>.OnNextNotification(value);
}
public static Notification<T> CreateOnError<[System.Runtime.CompilerServices.Nullable(2)] T>(Exception error)
{
if (error == null)
throw new ArgumentNullException("error");
return new Notification<T>.OnErrorNotification(error);
}
public static Notification<T> CreateOnCompleted<[System.Runtime.CompilerServices.Nullable(2)] T>()
{
return Notification<T>.OnCompletedNotification.Instance;
}
}
}