Beispiel #1
0
        protected internal virtual void ScheduleEventAsync(object payload)
        {
            EventSubscriptionJobDeclaration asyncDeclaration = JobDeclaration;

            if (asyncDeclaration == null)
            {
                // fallback to sync if we couldn't find a job declaration
                ProcessEventSync(payload);
            }
            else
            {
                MessageEntity  message        = asyncDeclaration.CreateJobInstance(this);
                CommandContext commandContext = context.Impl.Context.CommandContext;
                commandContext.JobManager.Send(message);
            }
        }