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));
     }
 }
Exemplo n.º 2
0
 protected MsmqIntegrationInputMessage(MsmqInputMessage.SizeQuota bufferSizeQuota) : base(0x16, bufferSizeQuota)
 {
     this.acknowledge            = new NativeMsmqMessage.ByteProperty(this, 6);
     this.adminQueue             = new NativeMsmqMessage.StringProperty(this, 0x11, 0x100);
     this.adminQueueLength       = new NativeMsmqMessage.IntProperty(this, 0x12, 0x100);
     this.appSpecific            = new NativeMsmqMessage.IntProperty(this, 8);
     this.arrivedTime            = new NativeMsmqMessage.IntProperty(this, 0x20);
     this.senderIdType           = new NativeMsmqMessage.IntProperty(this, 0x16);
     this.authenticated          = new NativeMsmqMessage.ByteProperty(this, 0x19);
     this.bodyType               = new NativeMsmqMessage.IntProperty(this, 0x2a);
     this.correlationId          = new NativeMsmqMessage.BufferProperty(this, 3, 20);
     this.destinationQueue       = new NativeMsmqMessage.StringProperty(this, 0x3a, 0x100);
     this.destinationQueueLength = new NativeMsmqMessage.IntProperty(this, 0x3b, 0x100);
     this.extension              = new NativeMsmqMessage.BufferProperty(this, 0x23, bufferSizeQuota.AllocIfAvailable(0));
     this.extensionLength        = new NativeMsmqMessage.IntProperty(this, 0x24, 0);
     this.label                    = new NativeMsmqMessage.StringProperty(this, 11, 0x80);
     this.labelLength              = new NativeMsmqMessage.IntProperty(this, 12, 0x80);
     this.priority                 = new NativeMsmqMessage.ByteProperty(this, 4);
     this.responseFormatName       = new NativeMsmqMessage.StringProperty(this, 0x36, 0x100);
     this.responseFormatNameLength = new NativeMsmqMessage.IntProperty(this, 0x37, 0x100);
     this.sentTime                 = new NativeMsmqMessage.IntProperty(this, 0x1f);
     this.timeToReachQueue         = new NativeMsmqMessage.IntProperty(this, 13);
     this.privacyLevel             = new NativeMsmqMessage.IntProperty(this, 0x17);
 }