C# Class Spring.Objects.Events.Support.EventRegistry

Default implementation of the Spring.Objects.Events.IEventRegistry interface.
Inheritance: IEventRegistry
Datei anzeigen Open project: spring-projects/spring-net

Public Methods

Method Description
EventRegistry ( ) : System

Creates a new instance of the EventRegistry class.

PublishEvents ( object source ) : void

Adds the input object to the list of publishers.

This publishes all events of the source object to any object wishing to subscribe

Subscribe ( object subscriber ) : void

Subscribes to all events published, if the subscriber implements compatible handler methods.

Subscribe ( object subscriber, Type sourceType ) : void

Subscribes to published events of all objects of a given type, if the subscriber implements compatible handler methods.

Unsubscribe ( object subscriber ) : void

Unsubscribes to all events published, if the subscriber implmenets compatible handler methods.

Unsubscribe ( object subscriber, Type sourceType ) : void

Unsubscribes to the published events of all objects of a given System.Type, if the subscriber implements compatible handler methods.

Private Methods

Method Description
WireOrUnwireSubscriberToPublisher ( object currentPublisher, Type currentSubscriberType, object subscriber, bool wire ) : void

Method Details

EventRegistry() public method

Creates a new instance of the EventRegistry class.
public EventRegistry ( ) : System
return System

PublishEvents() public method

Adds the input object to the list of publishers.
This publishes all events of the source object to any object wishing to subscribe
public PublishEvents ( object source ) : void
source object The source object to publish.
return void

Subscribe() public method

Subscribes to all events published, if the subscriber implements compatible handler methods.
public Subscribe ( object subscriber ) : void
subscriber object The subscriber to use.
return void

Subscribe() public method

Subscribes to published events of all objects of a given type, if the subscriber implements compatible handler methods.
public Subscribe ( object subscriber, Type sourceType ) : void
subscriber object The subscriber to use.
sourceType System.Type /// The target to subscribe to. ///
return void

Unsubscribe() public method

Unsubscribes to all events published, if the subscriber implmenets compatible handler methods.
public Unsubscribe ( object subscriber ) : void
subscriber object The subscriber to use
return void

Unsubscribe() public method

Unsubscribes to the published events of all objects of a given System.Type, if the subscriber implements compatible handler methods.
public Unsubscribe ( object subscriber, Type sourceType ) : void
subscriber object The subscriber to use.
sourceType System.Type The target to unsubscribe from
return void