C# Class NContext.EventHandling.EventManager

Defines an application component for event handling.
Inheritance: IManageEvents
Afficher le fichier Open project: PowerDMS/NContext

Méthodes publiques

Méthode Description
Configure ( ApplicationConfigurationBase applicationConfiguration ) : void

Configures the component instance. This method should set IsConfigured.

EventManager ( IActivationProvider activationProvider ) : System

Initializes a new instance of the EventManager class.

Raise ( object @event ) : Task

Raises the specified event.

Méthodes protégées

Méthode Description
GetPartitionCount ( Int32 handlerCount ) : Int32

Determines the number of partitions to create for concurrent execution of processing event handlers. This will affect the number of thread-pool threads queued to execute handlers in parallel. By default, EventManager will only process a maximum of Environment.ProcessorCount (one thread per virtual processor) unless the handlerCount is less than the Environment.ProcessorCount value. In which it will partition according to the handlerCount.

Private Methods

Méthode Description
InvokeEventHandler ( EventHandlerInformation handlerInformation, MethodInfo createInstanceMethod, object @event ) : Task
RaiseEventInternal ( object @event ) : Task

Method Details

Configure() public méthode

Configures the component instance. This method should set IsConfigured.
public Configure ( ApplicationConfigurationBase applicationConfiguration ) : void
applicationConfiguration ApplicationConfigurationBase The application configuration.
Résultat void

EventManager() public méthode

Initializes a new instance of the EventManager class.
public EventManager ( IActivationProvider activationProvider ) : System
activationProvider IActivationProvider The activation provider.
Résultat System

GetPartitionCount() protected méthode

Determines the number of partitions to create for concurrent execution of processing event handlers. This will affect the number of thread-pool threads queued to execute handlers in parallel. By default, EventManager will only process a maximum of Environment.ProcessorCount (one thread per virtual processor) unless the handlerCount is less than the Environment.ProcessorCount value. In which it will partition according to the handlerCount.
protected GetPartitionCount ( Int32 handlerCount ) : Int32
handlerCount System.Int32
Résultat System.Int32

Raise() public méthode

Raises the specified event.
public Raise ( object @event ) : Task
@event object
Résultat Task