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
- TraceUtils.cs
- ServiceDiscoveryElement.cs
- TakeQueryOptionExpression.cs
- RawStylusSystemGestureInputReport.cs
- IgnoreDeviceFilterElementCollection.cs
- DockPanel.cs
- Util.cs
- VersionedStream.cs
- CheckBoxAutomationPeer.cs
- SetStoryboardSpeedRatio.cs
- ItemsControl.cs
- DictionaryBase.cs
- Lasso.cs
- WebPartTransformerCollection.cs
- CorrelationToken.cs
- ReadOnlyDataSourceView.cs
- FixedSOMTable.cs
- DataServicePagingProviderWrapper.cs
- CultureSpecificStringDictionary.cs
- CanonicalizationDriver.cs
- OleDbCommand.cs
- StreamMarshaler.cs
- AffineTransform3D.cs
- PeerCollaborationPermission.cs
- NetCodeGroup.cs
- COAUTHINFO.cs
- Wildcard.cs
- DescendantOverDescendantQuery.cs
- ServiceNameCollection.cs
- TriggerActionCollection.cs
- CopyNodeSetAction.cs
- DateTimeFormat.cs
- LayoutDump.cs
- AttributeUsageAttribute.cs
- WebPartDescription.cs
- WeakEventTable.cs
- MediaCommands.cs
- XmlValueConverter.cs
- EntityDataSourceColumn.cs
- PropertyGeneratedEventArgs.cs
- GlyphRunDrawing.cs
- COAUTHINFO.cs
- DbFunctionCommandTree.cs
- HMACRIPEMD160.cs
- SignedXml.cs
- ServiceHandle.cs
- ManifestSignedXml.cs
- StylusEventArgs.cs
- CheckableControlBaseAdapter.cs
- _IPv4Address.cs
- ToolBarButton.cs
- QilIterator.cs
- ReferenceSchema.cs
- EtwProvider.cs
- TextCompositionEventArgs.cs
- Vector3DKeyFrameCollection.cs
- DebugTracing.cs
- DataGridTableCollection.cs
- NameValuePair.cs
- SapiRecoInterop.cs
- GetParentChain.cs
- CompositionTarget.cs
- SynchronizedInputAdaptor.cs
- WebControlsSection.cs
- ValidationError.cs
- HtmlDocument.cs
- AssemblyNameProxy.cs
- ByteConverter.cs
- ArithmeticException.cs
- ContractMapping.cs
- COM2FontConverter.cs
- X509Certificate.cs
- SafeRightsManagementHandle.cs
- AnonymousIdentificationSection.cs
- Activity.cs
- HuffCodec.cs
- FieldInfo.cs
- RepeaterDesigner.cs
- RepeatEnumerable.cs
- Journaling.cs
- PropertyBuilder.cs
- SiteMapNode.cs
- NewExpression.cs
- RouteValueDictionary.cs
- DataPointer.cs
- WebGetAttribute.cs
- TextParagraphProperties.cs
- FunctionCommandText.cs
- LocalizableAttribute.cs
- StorageTypeMapping.cs
- ToolStripLocationCancelEventArgs.cs
- ReflectionServiceProvider.cs
- ContractType.cs
- ConnectivityStatus.cs
- COM2IPerPropertyBrowsingHandler.cs
- WebServiceData.cs
- SafeRightsManagementPubHandle.cs
- AttributeEmitter.cs
- ImageResources.Designer.cs
- TabOrder.cs