Observer

A base IObserver implementation.

Inheritance

ObjectObserver
Namespace: PureMVC.Patterns.ObserverAssembly: PureMVC in (PureMVC.dll)

Syntax

C#
public class Observer: IObserver

Remarks

An Observer is an object that encapsulates information about an interested object with a method that should be called when a particular INotification is broadcast.

In PureMVC, the Observer class assumes these responsibilities:

  • Encapsulate the notification (callback) method of the interested object.
  • Encapsulate the notification context (this) of the interested object.
  • Provide methods for setting the notification method and context.
  • Provide a method for notifying the interested object.

Constructors

Constructor.

Methods

Compare an object to the notification context.
Notify the interested object.

Properties

Context object
Callback method

See also