예제 #1
0
        private void EnqueueMessage(BusinessObjects.WorkManagement.Appointment messageBody, string messageLabel)
        {
            FinalBuild.QueueWriter objMessageWriter = null;
            string strQueuePath = @"FormatName:Direct=OS:cs717189\private$\JobAppointmentQueue";

            if (ConfigurationManager.AppSettings["JobAppointmentQueue"] != null)
            {
                strQueuePath = ConfigurationManager.AppSettings["JobAppointmentQueue"];
            }

            objMessageWriter = new FinalBuild.QueueWriter(strQueuePath, true);
            objMessageWriter.MessageWritten += new FinalBuild.QueueWriter.MessageWrittenHandler(mobjMessageWriter_MessageWritten);
            objMessageWriter.WriteToQueue(messageBody, messageBody.GetType(), messageLabel);
        }
예제 #2
0
        public void EnqueueMessage(int noOfRetriesSofar)
        {
            FinalBuild.QueueWriter objMessageWriter = null;
            string queuePath = DetermineJobStatusQueuePath(this.ID);

            objMessageWriter = new FinalBuild.QueueWriter(queuePath, true);
            objMessageWriter.MessageWritten += new FinalBuild.QueueWriter.MessageWrittenHandler(mobjMessageWriter_MessageWritten);
            objMessageWriter.WriteToQueue(this, this.GetType(), this.SourceSystem.ToString() + ":" + this.ID.ToString(), noOfRetriesSofar);
        }