Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / MsmqTransportSecurity.cs / 1 / MsmqTransportSecurity.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System; using System.ServiceModel.Channels; using System.ServiceModel.Security; using System.Net; using System.Net.Security; public sealed class MsmqTransportSecurity { MsmqAuthenticationMode msmqAuthenticationMode; MsmqEncryptionAlgorithm msmqEncryptionAlgorithm; MsmqSecureHashAlgorithm msmqHashAlgorithm; ProtectionLevel msmqProtectionLevel; public MsmqTransportSecurity() { this.msmqAuthenticationMode = MsmqDefaults.MsmqAuthenticationMode; this.msmqEncryptionAlgorithm = MsmqDefaults.MsmqEncryptionAlgorithm; this.msmqHashAlgorithm = MsmqDefaults.MsmqSecureHashAlgorithm; this.msmqProtectionLevel = MsmqDefaults.MsmqProtectionLevel; } public MsmqTransportSecurity(MsmqTransportSecurity other) { if (null == other) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("other"); this.msmqAuthenticationMode = other.MsmqAuthenticationMode; this.msmqEncryptionAlgorithm = other.MsmqEncryptionAlgorithm; this.msmqHashAlgorithm = other.MsmqSecureHashAlgorithm; this.msmqProtectionLevel = other.MsmqProtectionLevel; } internal bool Enabled { get { return this.msmqAuthenticationMode != MsmqAuthenticationMode.None && this.msmqProtectionLevel != ProtectionLevel.None; } } public MsmqAuthenticationMode MsmqAuthenticationMode { get { return this.msmqAuthenticationMode; } set { if (! MsmqAuthenticationModeHelper.IsDefined(value)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); this.msmqAuthenticationMode = value; } } public MsmqEncryptionAlgorithm MsmqEncryptionAlgorithm { get { return this.msmqEncryptionAlgorithm; } set { if (! MsmqEncryptionAlgorithmHelper.IsDefined(value)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); this.msmqEncryptionAlgorithm = value; } } public MsmqSecureHashAlgorithm MsmqSecureHashAlgorithm { get { return this.msmqHashAlgorithm; } set { if (! MsmqSecureHashAlgorithmHelper.IsDefined(value)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); this.msmqHashAlgorithm = value; } } public ProtectionLevel MsmqProtectionLevel { get { return this.msmqProtectionLevel; } set { if (! ProtectionLevelHelper.IsDefined(value)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); this.msmqProtectionLevel = value; } } internal void Disable() { this.msmqAuthenticationMode = MsmqAuthenticationMode.None; this.msmqProtectionLevel = ProtectionLevel.None; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MetadataItem.cs
- EncodingTable.cs
- WebPartExportVerb.cs
- AuthenticodeSignatureInformation.cs
- TextElementEnumerator.cs
- XmlComplianceUtil.cs
- SecurityManager.cs
- SynchronizationLockException.cs
- Matrix3DStack.cs
- CompoundFileStorageReference.cs
- OleServicesContext.cs
- CacheSection.cs
- ResourcePool.cs
- ColorTransform.cs
- CalendarSelectionChangedEventArgs.cs
- ServiceBusyException.cs
- FormatException.cs
- contentDescriptor.cs
- TimeManager.cs
- SimpleRecyclingCache.cs
- InheritanceAttribute.cs
- XamlRtfConverter.cs
- DataGridViewComboBoxColumnDesigner.cs
- XmlLangPropertyAttribute.cs
- ControlUtil.cs
- regiisutil.cs
- UTF7Encoding.cs
- Soap.cs
- dsa.cs
- TextTreeText.cs
- KnownColorTable.cs
- DeclaredTypeElementCollection.cs
- BlobPersonalizationState.cs
- XmlAttributeHolder.cs
- Propagator.Evaluator.cs
- EdmFunctions.cs
- LocalizationParserHooks.cs
- SoapHeaderException.cs
- StoreAnnotationsMap.cs
- OdbcConnectionFactory.cs
- XsltArgumentList.cs
- WbemProvider.cs
- LogRecordSequence.cs
- ListBoxChrome.cs
- PcmConverter.cs
- LocalBuilder.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DateTimeConstantAttribute.cs
- NamespaceInfo.cs
- StylusPlugInCollection.cs
- RefExpr.cs
- AssemblyBuilder.cs
- HttpFileCollectionBase.cs
- Native.cs
- DataGridViewRowCancelEventArgs.cs
- AesManaged.cs
- HtmlInputFile.cs
- controlskin.cs
- StrongNamePublicKeyBlob.cs
- httpserverutility.cs
- ModuleBuilderData.cs
- DefaultBindingPropertyAttribute.cs
- AlignmentXValidation.cs
- SessionStateSection.cs
- SpeechEvent.cs
- WebControl.cs
- IdnMapping.cs
- HandledEventArgs.cs
- ScriptHandlerFactory.cs
- LocatorPartList.cs
- WebDescriptionAttribute.cs
- ArrayList.cs
- DataGridViewUtilities.cs
- ScriptingWebServicesSectionGroup.cs
- NumericUpDown.cs
- HMACSHA512.cs
- RemoteWebConfigurationHostServer.cs
- SQLSingleStorage.cs
- DataContractSerializerServiceBehavior.cs
- WriteableBitmap.cs
- MulticastDelegate.cs
- XPathExpr.cs
- BasicCellRelation.cs
- CompilationPass2Task.cs
- EventPrivateKey.cs
- DefaultTextStoreTextComposition.cs
- FormattedTextSymbols.cs
- DockingAttribute.cs
- Sql8ConformanceChecker.cs
- ValueUnavailableException.cs
- GridViewDeletedEventArgs.cs
- DeobfuscatingStream.cs
- MatrixTransform.cs
- GrammarBuilderWildcard.cs
- CryptoProvider.cs
- WebPartZoneAutoFormat.cs
- HttpModuleAction.cs
- DataMisalignedException.cs
- SpeakProgressEventArgs.cs
- UpdateCommand.cs