MsmqTransportSecurityElement.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / MsmqTransportSecurityElement.cs / 1 / MsmqTransportSecurityElement.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel.Configuration 
{
    using System.Configuration; 
    using System.Globalization; 
    using System.Net;
    using System.Net.Security; 
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.ServiceModel.Security;
    using System.ComponentModel; 

    public sealed partial class MsmqTransportSecurityElement : ConfigurationElement 
    { 

        [ConfigurationProperty(ConfigurationStrings.MsmqAuthenticationMode, DefaultValue = MsmqDefaults.MsmqAuthenticationMode)] 
        [ServiceModelEnumValidator(typeof(MsmqAuthenticationModeHelper))]
        public MsmqAuthenticationMode MsmqAuthenticationMode
        {
            get { return (MsmqAuthenticationMode)base[ConfigurationStrings.MsmqAuthenticationMode]; } 
            set { base[ConfigurationStrings.MsmqAuthenticationMode] = value; }
        } 
 
        [ConfigurationProperty(ConfigurationStrings.MsmqEncryptionAlgorithm, DefaultValue = MsmqDefaults.MsmqEncryptionAlgorithm)]
        [ServiceModelEnumValidator(typeof(MsmqEncryptionAlgorithmHelper))] 
        public MsmqEncryptionAlgorithm MsmqEncryptionAlgorithm
        {
            get { return (MsmqEncryptionAlgorithm)base[ConfigurationStrings.MsmqEncryptionAlgorithm]; }
            set { base[ConfigurationStrings.MsmqEncryptionAlgorithm] = value; } 
        }
 
        [ConfigurationProperty(ConfigurationStrings.MsmqProtectionLevel, DefaultValue = MsmqDefaults.MsmqProtectionLevel)] 
        [ServiceModelEnumValidator(typeof(ProtectionLevelHelper))]
        public ProtectionLevel MsmqProtectionLevel 
        {
            get { return (ProtectionLevel)base[ConfigurationStrings.MsmqProtectionLevel]; }
            set { base[ConfigurationStrings.MsmqProtectionLevel] = value; }
        } 

        [ConfigurationProperty(ConfigurationStrings.MsmqSecureHashAlgorithm, DefaultValue = MsmqDefaults.MsmqSecureHashAlgorithm)] 
        [ServiceModelEnumValidator(typeof(MsmqSecureHashAlgorithmHelper))] 
        public MsmqSecureHashAlgorithm MsmqSecureHashAlgorithm
        { 
            get { return (MsmqSecureHashAlgorithm)base[ConfigurationStrings.MsmqSecureHashAlgorithm]; }
            set { base[ConfigurationStrings.MsmqSecureHashAlgorithm] = value; }
        }
 
        internal void ApplyConfiguration(MsmqTransportSecurity security)
        { 
            if (security == null) 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security");
 
            security.MsmqAuthenticationMode = this.MsmqAuthenticationMode;
            security.MsmqEncryptionAlgorithm = this.MsmqEncryptionAlgorithm;
            security.MsmqProtectionLevel = this.MsmqProtectionLevel;
            security.MsmqSecureHashAlgorithm = this.MsmqSecureHashAlgorithm; 
        }
 
        internal void InitializeFrom(MsmqTransportSecurity security) 
        {
            if (security == null) 
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("security");

            this.MsmqAuthenticationMode = security.MsmqAuthenticationMode;
            this.MsmqEncryptionAlgorithm = security.MsmqEncryptionAlgorithm; 
            this.MsmqProtectionLevel = security.MsmqProtectionLevel;
            this.MsmqSecureHashAlgorithm = security.MsmqSecureHashAlgorithm; 
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK