/// <summary>
        ///
        /// </summary>
        internal void PerformExecution(Envelope envelope)
        {
            EnvelopeUpdateDelegate envelopeExecutedDelegate = EnvelopeExecuteEvent;

            if (envelopeExecutedDelegate != null)
            {
                envelopeExecutedDelegate(this, envelope);
            }
        }
Пример #2
0
        protected void RaiseEnvelopeExecutingEvent(Envelope envelope)
        {
            EnvelopeUpdateDelegate envelopeReceivedDelegate = EnvelopeExecutingEvent;

            if (envelopeReceivedDelegate != null)
            {
                envelopeReceivedDelegate(this, envelope);
            }
        }
        /// <summary>
        /// Receive an envelope for executing.
        /// </summary>
        /// <param name="canExecute">Can directly execute on this thread.</param>
        public bool Receive(Envelope envelope)
        {
            EnvelopeUpdateDelegate envelopeReceivedDelegate = EnvelopeReceivedEvent;

            if (envelopeReceivedDelegate != null)
            {
                envelopeReceivedDelegate(this, envelope);
            }

            ArbiterSlimExecutionStrategy executionStrategy = _executionStrategy;

            if (executionStrategy != null)
            {
                executionStrategy.Execute(envelope);
            }

            return(true);
        }