Esempio n. 1
0
        public static IRegister AddAzureTopicWriter(this IRegister register, string queueName)
        {
            var queueSetting = new QueueSetting()
            {
                Name       = queueName,
                TypeMedium = typeof(AzureTopicMedium),
            };

            register.AddQueue(queueSetting);
            return(register);
        }
Esempio n. 2
0
        public static IRegister AddAzureQueueReader <T>(this IRegister register, string queueName, Action <T> predicate)
        {
            var queueSetting = new QueueSetting()
            {
                Name       = queueName,
                TypeMedium = typeof(AzureQueueMedium),
            };

            register.AddQueue(queueSetting, predicate);
            return(register);
        }
Esempio n. 3
0
        /// <summary>
        /// Add memory writer
        /// </summary>
        /// <param name="register"></param>
        /// <param name="queueName"></param>
        /// <returns></returns>
        public static IRegister AddMemoryWriter(this IRegister register, string queueName)
        {
            if (queueName == null || register == null)
            {
                throw new ArgumentNullException();
            }

            var queueSetting = new QueueSetting()
            {
                Name       = queueName,
                TypeMedium = typeof(InMemoryMedium),
            };

            register.AddQueue(queueSetting);
            return(register);
        }
Esempio n. 4
0
        /// <summary>
        /// Add anonymous memory reader
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="register"></param>
        /// <param name="queueName"></param>
        /// <param name="predicate"></param>
        /// <returns></returns>
        public static IRegister AddMemoryReader <T>(this IRegister register, string queueName, Action <T> predicate)
        {
            if (queueName == null || register == null || predicate == null)
            {
                throw new ArgumentNullException();
            }

            var queueSetting = new QueueSetting()
            {
                Name       = queueName,
                TypeMedium = typeof(InMemoryMedium),
            };

            register.AddQueue <T>(queueSetting, predicate);
            return(register);
        }