C# Класс NContext.EventHandling.EventManager

Defines an application component for event handling.
Наследование: IManageEvents
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
InvokeEventHandler ( EventHandlerInformation handlerInformation, MethodInfo createInstanceMethod, object @event ) : Task
RaiseEventInternal ( object @event ) : Task

Описание методов

Configure() публичный Метод

Configures the component instance. This method should set IsConfigured.
public Configure ( ApplicationConfigurationBase applicationConfiguration ) : void
applicationConfiguration ApplicationConfigurationBase The application configuration.
Результат void

EventManager() публичный Метод

Initializes a new instance of the EventManager class.
public EventManager ( IActivationProvider activationProvider ) : System
activationProvider IActivationProvider The activation provider.
Результат System

GetPartitionCount() защищенный Метод

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
Результат System.Int32

Raise() публичный Метод

Raises the specified event.
public Raise ( object @event ) : Task
@event object
Результат Task