public MsmqIntegrationOutputMessage(MsmqChannelFactoryBase <IOutputChannel> factory, int bodySize, EndpointAddress remoteAddress, MsmqIntegrationMessageProperty property) : base(factory, bodySize, remoteAddress, 8) { if (property.AcknowledgeType.HasValue) { this.EnsureAcknowledgeProperty((byte)property.AcknowledgeType.Value); } if (null != property.AdministrationQueue) { this.EnsureAdminQueueProperty(property.AdministrationQueue, false); } if (property.AppSpecific.HasValue) { this.appSpecific = new NativeMsmqMessage.IntProperty(this, 8, property.AppSpecific.Value); } if (property.BodyType.HasValue) { base.EnsureBodyTypeProperty(property.BodyType.Value); } if (property.CorrelationId != null) { this.correlationId = new NativeMsmqMessage.BufferProperty(this, 3, MsmqMessageId.FromString(property.CorrelationId)); } if (property.Extension != null) { this.extension = new NativeMsmqMessage.BufferProperty(this, 0x23, property.Extension); } if (property.Label != null) { this.label = new NativeMsmqMessage.StringProperty(this, 11, property.Label); } if (property.Priority.HasValue) { this.priority = new NativeMsmqMessage.ByteProperty(this, 4, (byte)property.Priority.Value); } if (null != property.ResponseQueue) { this.EnsureResponseQueueProperty(property.ResponseQueue); } if (property.TimeToReachQueue.HasValue) { base.EnsureTimeToReachQueueProperty(MsmqDuration.FromTimeSpan(property.TimeToReachQueue.Value)); } }
public MsmqIntegrationOutputMessage( MsmqChannelFactoryBase <IOutputChannel> factory, int bodySize, EndpointAddress remoteAddress, MsmqIntegrationMessageProperty property) : base(factory, bodySize, remoteAddress, 8) { if (null == property) { Fx.Assert("MsmqIntegrationMessageProperty expected"); } if (property.AcknowledgeType.HasValue) { EnsureAcknowledgeProperty((byte)property.AcknowledgeType.Value); } if (null != property.AdministrationQueue) { EnsureAdminQueueProperty(property.AdministrationQueue, false); } if (property.AppSpecific.HasValue) { this.appSpecific = new IntProperty(this, UnsafeNativeMethods.PROPID_M_APPSPECIFIC, property.AppSpecific.Value); } if (property.BodyType.HasValue) { EnsureBodyTypeProperty(property.BodyType.Value); } if (null != property.CorrelationId) { this.correlationId = new BufferProperty(this, UnsafeNativeMethods.PROPID_M_CORRELATIONID, MsmqMessageId.FromString(property.CorrelationId)); } if (null != property.Extension) { this.extension = new BufferProperty(this, UnsafeNativeMethods.PROPID_M_EXTENSION, property.Extension); } if (null != property.Label) { this.label = new StringProperty(this, UnsafeNativeMethods.PROPID_M_LABEL, property.Label); } if (property.Priority.HasValue) { this.priority = new ByteProperty(this, UnsafeNativeMethods.PROPID_M_PRIORITY, (byte)property.Priority.Value); } if (null != property.ResponseQueue) { EnsureResponseQueueProperty(property.ResponseQueue); } if (property.TimeToReachQueue.HasValue) { EnsureTimeToReachQueueProperty(MsmqDuration.FromTimeSpan(property.TimeToReachQueue.Value)); } }