IObserver implementation.
More...

Public Member Functions | |
| Observer (string notifyMethod, object notifyContext) | |
| Constructs a new observer with the specified notification method and context. | |
| void | NotifyObserver (INotification notification) |
| Notify the interested object. | |
| bool | CompareNotifyContext (object obj) |
| Compare an object to the notification context. | |
Protected Attributes | |
| readonly object | m_syncRoot = new object() |
| Used for locking. | |
Properties | |
| string | NotifyMethod [get, set] |
| The notification (callback) method of the interested object. | |
| object | NotifyContext [get, set] |
| The notification context (this) of the interested object. | |
IObserver implementation.
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:
| PureMVC.Patterns.Observer.Observer | ( | string | notifyMethod, | |
| object | notifyContext | |||
| ) |
Constructs a new observer with the specified notification method and context.
| notifyMethod | The notification method of the interested object | |
| notifyContext | The notification context of the interested object |
The notification method on the interested object should take on parameter of type INotification
| bool PureMVC.Patterns.Observer.CompareNotifyContext | ( | object | obj | ) |
Compare an object to the notification context.
This method is thread safe
| obj | The object to compare |
Implements PureMVC.Interfaces.IObserver.
| void PureMVC.Patterns.Observer.NotifyObserver | ( | INotification | notification | ) |
Notify the interested object.
This method is thread safe
| notification | The INotification to pass to the interested object's notification method |
Implements PureMVC.Interfaces.IObserver.
readonly object PureMVC.Patterns.Observer.m_syncRoot = new object() [protected] |
Used for locking.
object PureMVC.Patterns.Observer.NotifyContext [get, set] |
The notification context (this) of the interested object.
This accessor is thread safe
Implements PureMVC.Interfaces.IObserver.
string PureMVC.Patterns.Observer.NotifyMethod [get, set] |
The notification (callback) method of the interested object.
The notification method should take one parameter of type INotification This accessor is thread safe
Implements PureMVC.Interfaces.IObserver.
1.5.8