Example #1
0
 public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
 {
     this.distributorService = distributorService;
     this.QueueTimerInterval = timerInterval;
     this.eventLogger        = distributorService.EventLogger;
     this.logDistributor     = new MsmqLogDistributor(EnterpriseLibraryFactory.BuildUp <LogWriter>(), msmqPath, this.eventLogger);
 }
Example #2
0
		/// <summary>
		/// Initialize a new instance of the <see cref="MsmqListener"/>.
		/// </summary>
		/// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
		/// <param name="timerInterval">Interval to check for new messages.</param>
		/// <param name="msmqPath">The name of the queue to get messages from.</param>
		public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
		{
			this.distributorService = distributorService;
			this.QueueTimerInterval = timerInterval;
			this.eventLogger = distributorService.EventLogger;

			this.logDistributor = new MsmqLogDistributor(EnterpriseLibraryFactory.BuildUp<LogWriter>(), msmqPath, this.eventLogger);
		}
		/// <summary>
		/// Initialize a new instance of the <see cref="MsmqListener"/>.
		/// </summary>
		/// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
		/// <param name="timerInterval">Interval to check for new messages.</param>
		/// <param name="msmqPath">The name of the queue to get messages from.</param>
		public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
		{
			this.distributorService = distributorService;
			this.QueueTimerInterval = timerInterval;
			this.eventLogger = distributorService.EventLogger;

			this.logDistributor = new MsmqLogDistributor(EnterpriseLibraryContainer.Current.GetInstance<LogWriter>(), msmqPath, this.eventLogger);
		}
		/// <summary>
		/// Initialize a new instance of the <see cref="MsmqListener"/>.
		/// </summary>
		/// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
		/// <param name="timerInterval">Interval to check for new messages.</param>
		/// <param name="msmqPath">The name of the queue to get messages from.</param>
		public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
		{
			this.distributorService = distributorService;
			this.QueueTimerInterval = timerInterval;
			this.eventLogger = distributorService.EventLogger;

			this.logDistributor = new MsmqLogDistributor(msmqPath, this.eventLogger);
		}
        /// <summary>
        /// Initialize a new instance of the <see cref="MsmqListener"/>.
        /// </summary>
        /// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
        /// <param name="timerInterval">Interval to check for new messages.</param>
        /// <param name="msmqPath">The name of the queue to get messages from.</param>
        public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
        {
            this.distributorService = distributorService;
            this.QueueTimerInterval = timerInterval;
            this.eventLogger        = distributorService.EventLogger;

            this.logDistributor = new MsmqLogDistributor(msmqPath, this.eventLogger);
        }
Example #6
0
        /// <summary>
        /// Initialize a new instance of the <see cref="MsmqListener"/>.
        /// </summary>
        /// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
        /// <param name="timerInterval">Interval to check for new messages.</param>
        public MsmqListener(DistributorService distributorService, int timerInterval)
        {
            this.distributorService = distributorService;
            this.QueueTimerInterval = timerInterval;
            this.eventLogger        = distributorService.EventLogger;

            this.logDistributor = new MsmqLogDistributor(ConfigurationManager.GetCurrentContext(), this.eventLogger);
        }
Example #7
0
        /// <summary>
        /// Initialize a new instance of the <see cref="MsmqListener"/>.
        /// </summary>
        /// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
        /// <param name="timerInterval">Interval to check for new messages.</param>
        /// <param name="msmqPath">The name of the queue to get messages from.</param>
        public MsmqListener(DistributorService distributorService, int timerInterval, string msmqPath)
        {
            this.distributorService = distributorService;
            this.QueueTimerInterval = timerInterval;
            this.eventLogger        = distributorService.EventLogger;

            this.logDistributor = new MsmqLogDistributor(EnterpriseLibraryContainer.Current.GetInstance <LogWriter>(), msmqPath, this.eventLogger);
        }
Example #8
0
        /// <summary>
        /// Initialize a new instance of the <see cref="MsmqListener"/>.
        /// </summary>
        /// <param name="distributorService">Distributor service inheriting from <see cref="System.ServiceProcess.ServiceBase"/>.</param>
        /// <param name="timerInterval">Interval to check for new messages.</param>
        public MsmqListener(DistributorService distributorService, int timerInterval)
        {
            this.distributorService = distributorService;
            this.QueueTimerInterval = timerInterval;
            this.eventLogger = distributorService.EventLogger;

            this.logDistributor = new MsmqLogDistributor(ConfigurationManager.GetCurrentContext(), this.eventLogger);
        }
Example #9
0
 public SanityCheck(DistributorService distributorService)
 {
     this.eventLogger        = distributorService.EventLogger;
     this.distributorService = distributorService;
 }
		public MockMsmqListener(DistributorService logDistributor, int timerInterval, string msmqPath)
            : base(logDistributor, timerInterval, msmqPath)
        {
        }
Example #11
0
 /// <summary>
 /// Returns a new <see cref="MsmqListener"/>.
 /// </summary>
 /// <param name="distributorService">The distributor service for the listener.</param>
 /// <param name="timerInterval">Interval to check for new messages.</param>
 /// <param name="msmqPath">The name of the queue to get messages from.</param>
 /// <returns>A new msmq listener.</returns>
 protected virtual MsmqListener CreateListener(DistributorService distributorService, int timerInterval, string msmqPath)
 {
     return new MsmqListener(distributorService, timerInterval, msmqPath);
 }
Example #12
0
        public SanityCheck(DistributorService distributorService)
        {
			this.eventLogger = distributorService.EventLogger;
            this.distributorService = distributorService;
        }
Example #13
0
 /// <summary>
 /// Returns a new MSMQ listener.
 /// </summary>
 /// <param name="distributorService">The distributor service for the listener.</param>
 /// <param name="timerInterval">The interval to check for new messages.</param>
 /// <param name="msmqPath">The name of the queue to get messages from.</param>
 /// <returns>A new MSMQ listener.</returns>
 protected virtual MsmqListener CreateListener(DistributorService distributorService, int timerInterval, string msmqPath)
 {
     return(new MsmqListener(distributorService, timerInterval, msmqPath));
 }