예제 #1
0
        public static WorkflowOptions UseRabbitMQ(this WorkflowOptions options, IConnectionFactory connectionFactory)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (connectionFactory == null)
            {
                throw new ArgumentNullException(nameof(connectionFactory));
            }

            return(options
                   .UseRabbitMQ((sp, name) => connectionFactory.CreateConnection(name)));
        }
예제 #2
0
        public static WorkflowOptions UseRabbitMQ(this WorkflowOptions options,
                                                  IConnectionFactory connectionFactory,
                                                  IEnumerable <string> hostnames)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (connectionFactory == null)
            {
                throw new ArgumentNullException(nameof(connectionFactory));
            }
            if (hostnames == null)
            {
                throw new ArgumentNullException(nameof(hostnames));
            }

            return(options
                   .UseRabbitMQ((sp, name) => connectionFactory.CreateConnection(hostnames.ToList(), name)));
        }