/// <summary>
        /// Mockable Constructor
        /// </summary>
        /// <param name="reciever">Service Bus Message Client</param>
        /// <param name="waitTime">Server Wait Time</param>
        public BusMessageReciever(IBusReciever reciever, int waitTime = DefaultWaitTime)
        {
            if (null == reciever)
            {
                throw new ArgumentNullException("client");
            }

            this.reciever = reciever;
            var wt = waitTime <= 0 ? DefaultWaitTime : waitTime;

            this.serverWaitTime = TimeSpan.FromSeconds(wt);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Service Bus Events
        /// </summary>
        /// <param name="reciever">Source</param>
        /// <param name="eventHandler">Event Handler</param>
        /// <param name="concurrentCalls">Concurrent Calls</param>
        public BusEvents(IBusReciever reciever, IBusEventHandler <T> eventHandler, byte concurrentCalls = DefaultConcurrentCalls)
        {
            if (null == reciever)
            {
                throw new ArgumentNullException("source");
            }
            if (null == eventHandler)
            {
                throw new ArgumentNullException("eventHandler");
            }

            this.reciever        = reciever;
            this.handler         = eventHandler;
            this.concurrentCalls = concurrentCalls <= 5 ? DefaultConcurrentCalls : concurrentCalls;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Service Bus Events
 /// </summary>
 /// <param name="reciever">Queu/Topic</param>
 /// <param name="eventHandler">Event Handler</param>
 /// <param name="concurrentCalls">Concurrent Calls</param>
 public BufferedReciever(IBusReciever reciever, IBusEventHandler <T> eventHandler, byte concurrentCalls = BusEvents <T> .DefaultConcurrentCalls)
     : base(reciever, new BufferedMessageEventHandler <T>(eventHandler, new Sleep()), concurrentCalls)
 {
 }
 /// <summary>
 /// Mockable Constructor
 /// </summary>
 /// <param name="client">Bus Subscription Client</param>
 public BusSubscriptionReciever(IBusReciever client)
     : base(client)
 {
 }