/// <summary> /// Initializes a new instance of the <see cref="AsyncEventOperation"/> class. /// </summary> /// <param name="asyncEvent">The asynchronous event.</param> /// <param name="poolHandler">The pool handler.</param> /// <param name="eventLog">The event log.</param> public AsyncEventOperation(AsyncEvent asyncEvent, IAsyncEventExecutionEngine poolHandler, IMyEventLog eventLog) : base("AsyncEventOperation", eventLog) { AsyncEventOperation asyncEventOperation = this; this.AsyncEvent = asyncEvent; this._poolHander = poolHandler; this._eventAction = operation => asyncEventOperation.ReuseResource = !(asyncEventOperation._poolHander.ProcessAsyncEvent(asyncEvent) is AsyncInProgressResult); }
/// <summary> /// Initializes a new instance of the <see cref="QueueManager"/> class. /// </summary> /// <param name="instanceName">Name of the instance.</param> /// <param name="operationsFactory">The operations factory.</param> /// <param name="counters">The counters.</param> /// <param name="config">The configuration.</param> /// <param name="dataAccessFactory">The data access factory.</param> /// <param name="errorHandler">The error handler.</param> /// <param name="eventLog">The event log.</param> public QueueManager(string instanceName, IServiceOperationsFactory operationsFactory, IQueuePerformanceCounters counters, IQueueConfiguration config, IQueueDataAccessFactory dataAccessFactory, ErrorHandler errorHandler, IMyEventLog eventLog) { _handler = null; _timers = new TimerBasedExecutionEngine[0]; _specialTransitionsLock = new object(); _specialTransitions = new Dictionary<Guid, AsyncHandlerEarlyExitRequest>(); InstanceName = DecorateInstanceName(instanceName); Counters = counters; Configuration = config; ShuttingDown = false; _shutdownEvent = null; _disposed = false; _dataAccessFactory = dataAccessFactory; _errorHandler = errorHandler; EventLog = eventLog; OperationsFactory = operationsFactory; }
/// <summary> /// Initializes a new instance of the <see cref="GenericMonitoredOperation"/> class. /// </summary> /// <param name="eventName">Name of the event.</param> /// <param name="eventAction">The event action.</param> /// <param name="eventLog">The event log.</param> protected GenericMonitoredOperation(string eventName, ServiceOperationAction eventAction, IMyEventLog eventLog) : base(eventName, eventLog) { this._eventAction = eventAction; }