コード例 #1
0
 protected void EnsureJournalProperty(byte flag, bool isFlagSet)
 {
     if (this.journal == null)
     {
         this.journal = new NativeMsmqMessage.ByteProperty(this, 7);
     }
     if (isFlagSet)
     {
         this.journal.Value = (byte)(this.journal.Value | flag);
     }
     else
     {
         this.journal.Value = (byte)(this.journal.Value & ~flag);
     }
 }
 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);
 }
コード例 #3
0
 public QueueTransactionProperties() : base(1)
 {
     this.transaction = new NativeMsmqMessage.ByteProperty(this, 0x71);
 }
コード例 #4
0
        protected MsmqOutputMessage(MsmqChannelFactoryBase <TChannel> factory, int bodySize, EndpointAddress remoteAddress, int additionalPropertyCount) : base(15 + additionalPropertyCount)
        {
            this.body      = new NativeMsmqMessage.BufferProperty(this, 9, bodySize);
            this.messageId = new NativeMsmqMessage.BufferProperty(this, 2, 20);
            this.EnsureBodyTypeProperty(0x1011);
            this.EnsureJournalProperty(2, factory.UseSourceJournal);
            this.delivery = new NativeMsmqMessage.ByteProperty(this, 5);
            if (factory.Durable)
            {
                this.delivery.Value = 1;
            }
            else
            {
                this.delivery.Value = 0;
            }
            if (factory.TimeToLive != TimeSpan.MaxValue)
            {
                int num = MsmqDuration.FromTimeSpan(factory.TimeToLive);
                this.EnsureTimeToReachQueueProperty(num);
                this.timeToBeReceived = new NativeMsmqMessage.IntProperty(this, 14, num);
            }
            switch (factory.DeadLetterQueue)
            {
            case DeadLetterQueue.None:
                this.EnsureJournalProperty(1, false);
                break;

            case DeadLetterQueue.System:
                this.EnsureJournalProperty(1, true);
                break;

            case DeadLetterQueue.Custom:
                this.EnsureJournalProperty(1, true);
                this.EnsureDeadLetterQueueProperty(factory.DeadLetterQueuePathName);
                break;
            }
            if (MsmqAuthenticationMode.WindowsDomain == factory.MsmqTransportSecurity.MsmqAuthenticationMode)
            {
                this.EnsureSenderIdTypeProperty(1);
                this.authLevel     = new NativeMsmqMessage.IntProperty(this, 0x18, 1);
                this.hashAlgorithm = new NativeMsmqMessage.IntProperty(this, 0x1a, MsmqSecureHashAlgorithmHelper.ToInt32(factory.MsmqTransportSecurity.MsmqSecureHashAlgorithm));
                if (ProtectionLevel.EncryptAndSign == factory.MsmqTransportSecurity.MsmqProtectionLevel)
                {
                    this.privLevel           = new NativeMsmqMessage.IntProperty(this, 0x17, 3);
                    this.encryptionAlgorithm = new NativeMsmqMessage.IntProperty(this, 0x1b, MsmqEncryptionAlgorithmHelper.ToInt32(factory.MsmqTransportSecurity.MsmqEncryptionAlgorithm));
                }
            }
            else if (MsmqAuthenticationMode.Certificate == factory.MsmqTransportSecurity.MsmqAuthenticationMode)
            {
                this.authLevel     = new NativeMsmqMessage.IntProperty(this, 0x18, 1);
                this.hashAlgorithm = new NativeMsmqMessage.IntProperty(this, 0x1a, MsmqSecureHashAlgorithmHelper.ToInt32(factory.MsmqTransportSecurity.MsmqSecureHashAlgorithm));
                if (ProtectionLevel.EncryptAndSign == factory.MsmqTransportSecurity.MsmqProtectionLevel)
                {
                    this.privLevel           = new NativeMsmqMessage.IntProperty(this, 0x17, 3);
                    this.encryptionAlgorithm = new NativeMsmqMessage.IntProperty(this, 0x1b, MsmqEncryptionAlgorithmHelper.ToInt32(factory.MsmqTransportSecurity.MsmqEncryptionAlgorithm));
                }
                this.EnsureSenderIdTypeProperty(0);
                this.senderCert = new NativeMsmqMessage.BufferProperty(this, 0x1c);
            }
            else
            {
                this.authLevel = new NativeMsmqMessage.IntProperty(this, 0x18, 0);
                this.EnsureSenderIdTypeProperty(0);
            }
            this.trace = new NativeMsmqMessage.ByteProperty(this, 0x29, factory.UseMsmqTracing ? ((byte)1) : ((byte)0));
        }