| 1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. |
| 2 |
|
| 3 |
#if NO_RXINTERFACES |
| 4 |
namespace System |
| 5 |
{ |
| 6 |
/// <summary> |
| 7 |
/// Supports push-style iteration over an observable sequence. |
| 8 |
/// </summary> |
| 9 |
#if !NO_VARIANCE |
| 10 |
public interface IObserver<in T> |
| 11 |
#else |
| 12 |
public interface IObserver<T> |
| 13 |
#endif |
| 14 |
{ |
| 15 |
/// <summary> |
| 16 |
/// Notifies the observer of a new element in the sequence. |
| 17 |
/// </summary> |
| 18 |
/// <param name="value">Next element in the sequence.</param> |
| 19 |
void OnNext(T value); |
| 20 |
|
| 21 |
/// <summary> |
| 22 |
/// Notifies the observer that an exception has occurred. |
| 23 |
/// </summary> |
| 24 |
/// <param name="error">The error that has occurred.</param> |
| 25 |
void OnError(Exception error); |
| 26 |
|
| 27 |
/// <summary> |
| 28 |
/// Notifies the observer of the end of the sequence. |
| 29 |
/// </summary> |
| 30 |
void OnCompleted(); |
| 31 |
} |
| 32 |
} |
| 33 |
#elif !WINDOWSPHONE7 // TypeForwardedTo is not presen on windows phone 7 so we can't really target |
| 34 |
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IObserver<>))] |
| 35 |
#endif |