Esempio n. 1
0
            private void ContinueConfiguration <TEvent>(
                EventPipelineConfigurator <TEvent> pipelineConfigurator
                )
                where TEvent : class
            {
                if (_parameters.IsQueued)
                {
                    pipelineConfigurator.ThenIsQueuedTo("DefaultQueue");
                }

                switch (_parameters.PublicationType)
                {
                case PublicationType.GlobalWithServiceHandlerSubscription:
                    pipelineConfigurator.ThenIsPublishedToGlobalSubscriptions();
                    break;

                case PublicationType.ScopedWithServiceHandlerSubscription:
                    pipelineConfigurator.ThenIsPublishedToScopedSubscriptions();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
Esempio n. 2
0
        /// <summary>
        ///     Adds a module to the current pipeline that publishes the event to all the global subscriptions locally.
        /// </summary>
        /// <typeparam name="TEvent">The type that publishes the event.</typeparam>
        /// <param name="eventPipelineConfigurator">
        ///     The <see cref="EventPipelineConfigurator{TEvent}"/> for the pipeline being configured.
        /// </param>
        /// <returns>The same <see cref="EventPipelineConfigurator{TEvent}"/> instance so that multiple calls can be chained.</returns>
        public static EventPipelineConfigurator <TEvent> ThenIsPublishedToGlobalSubscriptions <TEvent>(
            this EventPipelineConfigurator <TEvent> eventPipelineConfigurator
            )
            where TEvent : class

        => eventPipelineConfigurator.ThenIsPublishedToGlobalSubscriptions(x => ConfigureTransmission.Locally());