Пример #1
0
 protected void EnsureTimeToReachQueueProperty(int value)
 {
     if (this.timeToReachQueue == null)
     {
         this.timeToReachQueue = new NativeMsmqMessage.IntProperty(this, 13);
     }
     this.timeToReachQueue.Value = value;
 }
Пример #2
0
 protected void EnsureSenderIdTypeProperty(int value)
 {
     if (this.senderIdType == null)
     {
         this.senderIdType = new NativeMsmqMessage.IntProperty(this, 0x16);
     }
     this.senderIdType.Value = value;
 }
Пример #3
0
 protected void EnsureBodyTypeProperty(int value)
 {
     if (this.bodyType == null)
     {
         this.bodyType = new NativeMsmqMessage.IntProperty(this, 0x2a);
     }
     this.bodyType.Value = value;
 }
Пример #4
0
 protected MsmqInputMessage(int additionalPropertyCount, SizeQuota bufferSizeQuota) : base(12 + additionalPropertyCount)
 {
     this.maxBufferSize           = bufferSizeQuota.MaxSize;
     this.body                    = new NativeMsmqMessage.BufferProperty(this, 9, bufferSizeQuota.AllocIfAvailable(0x1000));
     this.bodyLength              = new NativeMsmqMessage.IntProperty(this, 10);
     this.messageId               = new NativeMsmqMessage.BufferProperty(this, 2, 20);
     this.lookupId                = new NativeMsmqMessage.LongProperty(this, 60);
     this.cls                     = new NativeMsmqMessage.ShortProperty(this, 1);
     this.senderId                = new NativeMsmqMessage.BufferProperty(this, 20, 0x100);
     this.senderIdLength          = new NativeMsmqMessage.IntProperty(this, 0x15);
     this.senderCertificate       = new NativeMsmqMessage.BufferProperty(this, 0x1c, bufferSizeQuota.AllocIfAvailable(0x1000));
     this.senderCertificateLength = new NativeMsmqMessage.IntProperty(this, 0x1d);
     if (Msmq.IsAdvancedPoisonHandlingSupported)
     {
         this.lastMovedTime = new NativeMsmqMessage.IntProperty(this, 0x4b);
         this.abortCount    = new NativeMsmqMessage.IntProperty(this, 0x45);
         this.moveCount     = new NativeMsmqMessage.IntProperty(this, 70);
     }
 }
 protected MsmqInputMessage(int additionalPropertyCount, SizeQuota bufferSizeQuota) : base(12 + additionalPropertyCount)
 {
     this.maxBufferSize = bufferSizeQuota.MaxSize;
     this.body = new NativeMsmqMessage.BufferProperty(this, 9, bufferSizeQuota.AllocIfAvailable(0x1000));
     this.bodyLength = new NativeMsmqMessage.IntProperty(this, 10);
     this.messageId = new NativeMsmqMessage.BufferProperty(this, 2, 20);
     this.lookupId = new NativeMsmqMessage.LongProperty(this, 60);
     this.cls = new NativeMsmqMessage.ShortProperty(this, 1);
     this.senderId = new NativeMsmqMessage.BufferProperty(this, 20, 0x100);
     this.senderIdLength = new NativeMsmqMessage.IntProperty(this, 0x15);
     this.senderCertificate = new NativeMsmqMessage.BufferProperty(this, 0x1c, bufferSizeQuota.AllocIfAvailable(0x1000));
     this.senderCertificateLength = new NativeMsmqMessage.IntProperty(this, 0x1d);
     if (Msmq.IsAdvancedPoisonHandlingSupported)
     {
         this.lastMovedTime = new NativeMsmqMessage.IntProperty(this, 0x4b);
         this.abortCount = new NativeMsmqMessage.IntProperty(this, 0x45);
         this.moveCount = new NativeMsmqMessage.IntProperty(this, 70);
     }
 }
 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);
 }
 public PrivateComputerProperties() : base(2)
 {
     this.version         = new NativeMsmqMessage.IntProperty(this, 0x16a9);
     this.activeDirectory = new NativeMsmqMessage.BooleanProperty(this, 0x16aa);
 }
 public MsmqRetryQueueMessage() : base(2)
 {
     this.lookupId = new NativeMsmqMessage.LongProperty(this, 60);
     this.lastMoveTime = new NativeMsmqMessage.IntProperty(this, 0x4b);
 }
Пример #9
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));
        }
Пример #10
0
 public MsmqRetryQueueMessage() : base(2)
 {
     this.lookupId     = new NativeMsmqMessage.LongProperty(this, 60);
     this.lastMoveTime = new NativeMsmqMessage.IntProperty(this, 0x4b);
 }