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
- WsatConfiguration.cs
- TdsValueSetter.cs
- BrowsableAttribute.cs
- TimeBoundedCache.cs
- DataTableNewRowEvent.cs
- OpenTypeLayout.cs
- ButtonAutomationPeer.cs
- ObjectStateEntry.cs
- TraceListener.cs
- EmptyCollection.cs
- ColorDialog.cs
- RegexWorker.cs
- WebPartEditVerb.cs
- _BasicClient.cs
- Control.cs
- DbBuffer.cs
- SoapEnumAttribute.cs
- HtmlSelectionListAdapter.cs
- EditingScope.cs
- NativeMethods.cs
- CardSpaceException.cs
- ListControlDesigner.cs
- MenuStrip.cs
- XmlSerializer.cs
- _Rfc2616CacheValidators.cs
- WebBrowser.cs
- ExpressionVisitor.cs
- FixedFindEngine.cs
- ParseChildrenAsPropertiesAttribute.cs
- IndependentAnimationStorage.cs
- WindowsNonControl.cs
- ImageIndexConverter.cs
- XPathAncestorIterator.cs
- M3DUtil.cs
- DocumentAutomationPeer.cs
- ClockController.cs
- ThreadStateException.cs
- ExpressionNode.cs
- Storyboard.cs
- ObjectListCommandCollection.cs
- PropertyValueChangedEvent.cs
- DropTarget.cs
- TextViewSelectionProcessor.cs
- hwndwrapper.cs
- XmlDictionary.cs
- UserControl.cs
- Dump.cs
- OleDbDataReader.cs
- DataGridRow.cs
- KnownBoxes.cs
- XmlConverter.cs
- AppSettingsReader.cs
- DataBinding.cs
- XmlSchemaValidator.cs
- panel.cs
- DefaultHttpHandler.cs
- WebPermission.cs
- LambdaCompiler.Logical.cs
- Axis.cs
- DbProviderFactory.cs
- DataGridCommandEventArgs.cs
- ComplexLine.cs
- SourceLineInfo.cs
- PrivilegedConfigurationManager.cs
- SoapIncludeAttribute.cs
- ProfileModule.cs
- XmlSchemaCompilationSettings.cs
- NonSerializedAttribute.cs
- DataGridViewTextBoxCell.cs
- IndependentAnimationStorage.cs
- ViewEventArgs.cs
- Parsers.cs
- OrthographicCamera.cs
- XmlAttributeProperties.cs
- RtfNavigator.cs
- XmlSequenceWriter.cs
- IndexOutOfRangeException.cs
- TypedTableBase.cs
- recordstatescratchpad.cs
- HttpCacheVaryByContentEncodings.cs
- DocumentReferenceCollection.cs
- GenericIdentity.cs
- SqlCommandSet.cs
- SortedDictionary.cs
- ExclusiveTcpListener.cs
- XslUrlEditor.cs
- XmlNamedNodeMap.cs
- CompressedStack.cs
- TraceLevelStore.cs
- EngineSite.cs
- TableCellsCollectionEditor.cs
- DiagnosticsConfigurationHandler.cs
- Cursor.cs
- ParsedAttributeCollection.cs
- ExtractorMetadata.cs
- AssemblyFilter.cs
- DefaultTextStore.cs
- TextTreeText.cs
- StaticExtension.cs
- CompiledScopeCriteria.cs