public void SetMessageProperties(MsmqIntegrationMessageProperty property) { property.AcknowledgeType = new AcknowledgeTypes?((AcknowledgeTypes)this.acknowledge.Value); property.Acknowledgment = new Acknowledgment?((Acknowledgment)base.Class.Value); property.AdministrationQueue = GetQueueName(this.adminQueue.GetValue(this.adminQueueLength.Value)); property.AppSpecific = new int?(this.appSpecific.Value); property.ArrivedTime = new DateTime?(MsmqDateTime.ToDateTime(this.arrivedTime.Value).ToLocalTime()); property.Authenticated = new bool?(this.authenticated.Value != 0); property.BodyType = new int?(this.bodyType.Value); property.CorrelationId = MsmqMessageId.ToString(this.correlationId.Buffer); property.DestinationQueue = GetQueueName(this.destinationQueue.GetValue(this.destinationQueueLength.Value)); property.Extension = this.extension.GetBufferCopy(this.extensionLength.Value); property.Id = MsmqMessageId.ToString(base.MessageId.Buffer); property.Label = this.label.GetValue(this.labelLength.Value); if (base.Class.Value == 0) { property.MessageType = 2; } else if (base.Class.Value == 1) { property.MessageType = 3; } else { property.MessageType = 1; } property.Priority = new MessagePriority?((MessagePriority)this.priority.Value); property.ResponseQueue = GetQueueName(this.responseFormatName.GetValue(this.responseFormatNameLength.Value)); property.SenderId = base.SenderId.GetBufferCopy(base.SenderIdLength.Value); property.SentTime = new DateTime?(MsmqDateTime.ToDateTime(this.sentTime.Value).ToLocalTime()); property.InternalSetTimeToReachQueue(MsmqDuration.ToTimeSpan(this.timeToReachQueue.Value)); }
public void SetMessageProperties(MsmqIntegrationMessageProperty property) { property.AcknowledgeType = (System.Messaging.AcknowledgeTypes) this.acknowledge.Value; property.Acknowledgment = (System.Messaging.Acknowledgment) this.Class.Value; property.AdministrationQueue = GetQueueName(this.adminQueue.GetValue(this.adminQueueLength.Value)); property.AppSpecific = this.appSpecific.Value; property.ArrivedTime = MsmqDateTime.ToDateTime(this.arrivedTime.Value).ToLocalTime(); property.Authenticated = this.authenticated.Value != 0; property.BodyType = this.bodyType.Value; property.CorrelationId = MsmqMessageId.ToString(this.correlationId.Buffer); property.DestinationQueue = GetQueueName(this.destinationQueue.GetValue(this.destinationQueueLength.Value)); property.Extension = this.extension.GetBufferCopy(this.extensionLength.Value); property.Id = MsmqMessageId.ToString(this.MessageId.Buffer); property.Label = this.label.GetValue(this.labelLength.Value); if (this.Class.Value == UnsafeNativeMethods.MQMSG_CLASS_NORMAL) { property.MessageType = System.Messaging.MessageType.Normal; } else if (this.Class.Value == UnsafeNativeMethods.MQMSG_CLASS_REPORT) { property.MessageType = System.Messaging.MessageType.Report; } else { property.MessageType = System.Messaging.MessageType.Acknowledgment; } property.Priority = (System.Messaging.MessagePriority) this.priority.Value; property.ResponseQueue = GetQueueName(this.responseFormatName.GetValue(this.responseFormatNameLength.Value)); property.SenderId = this.SenderId.GetBufferCopy(this.SenderIdLength.Value); property.SentTime = MsmqDateTime.ToDateTime(this.sentTime.Value).ToLocalTime(); property.InternalSetTimeToReachQueue(MsmqDuration.ToTimeSpan(this.timeToReachQueue.Value)); }