public interface IObserver<TType> {
void OnCompleted();
void OnError(Exception exception);
void OnNext(TType value);
}
public interface IObservable<TType> {
IDisposable Subscribe(IObserver<TType> observer);
}
I started using the Observer Pattern at work. (We recently started using .Net 4.5.) I wanted to use it in Unity. I goggled it and found nothing so I rolled my own.
I am sure some day Unity will take advantage of the newer versions of .Net. Until then, simply drop these two interfaces into your project and you can start building your observers and observables right away.
Enjoy.