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
- FileClassifier.cs
- AssemblyBuilder.cs
- InkCanvasInnerCanvas.cs
- TileBrush.cs
- FormParameter.cs
- ErrorTableItemStyle.cs
- SQLDouble.cs
- EventBuilder.cs
- WebPartConnectionsDisconnectVerb.cs
- SspiSecurityToken.cs
- DiagnosticTraceRecords.cs
- DataGridViewRowCancelEventArgs.cs
- SqlServer2KCompatibilityCheck.cs
- EntitySetDataBindingList.cs
- Line.cs
- LogEntryHeaderDeserializer.cs
- OutputCacheProfileCollection.cs
- OrCondition.cs
- ListChangedEventArgs.cs
- WebPartMinimizeVerb.cs
- AsyncPostBackErrorEventArgs.cs
- ThreadStaticAttribute.cs
- EventLogPermissionEntry.cs
- DSACryptoServiceProvider.cs
- ReliabilityContractAttribute.cs
- CssStyleCollection.cs
- RightsManagementPermission.cs
- DbMetaDataColumnNames.cs
- SerializationInfo.cs
- ConnectionPoolManager.cs
- ProfilePropertyNameValidator.cs
- SpecialTypeDataContract.cs
- StorageInfo.cs
- ImageClickEventArgs.cs
- Configuration.cs
- RegexRunnerFactory.cs
- CodeArrayIndexerExpression.cs
- RsaSecurityToken.cs
- IndexOutOfRangeException.cs
- EllipseGeometry.cs
- DataGridViewUtilities.cs
- MessageBox.cs
- ResourcesGenerator.cs
- OneToOneMappingSerializer.cs
- XamlWriterExtensions.cs
- TemplatedWizardStep.cs
- _SSPIWrapper.cs
- ConnectionPoolManager.cs
- HttpHandlerActionCollection.cs
- AuthenticateEventArgs.cs
- TreeView.cs
- GridViewSortEventArgs.cs
- TransactionInterop.cs
- MetadataItemEmitter.cs
- ConfigXmlElement.cs
- BrowserDefinitionCollection.cs
- DataGridItem.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- WaitForChangedResult.cs
- SecurityTokenException.cs
- XmlTextReader.cs
- DataPagerCommandEventArgs.cs
- ModuleConfigurationInfo.cs
- AutomationEvent.cs
- FileLogRecordEnumerator.cs
- XmlSerializationGeneratedCode.cs
- CfgParser.cs
- SoapCommonClasses.cs
- EntityTypeBase.cs
- XmlWriterTraceListener.cs
- DesignerDataSourceView.cs
- WmlLabelAdapter.cs
- ScrollViewerAutomationPeer.cs
- SyndicationDeserializer.cs
- securitycriticaldataClass.cs
- _AutoWebProxyScriptHelper.cs
- KeyTime.cs
- Compilation.cs
- FixedDocumentPaginator.cs
- DefaultValueAttribute.cs
- WorkflowViewStateService.cs
- StrongNameKeyPair.cs
- DropShadowBitmapEffect.cs
- Metadata.cs
- RepeatButton.cs
- IPCCacheManager.cs
- TaskFormBase.cs
- UidManager.cs
- UDPClient.cs
- EmptyReadOnlyDictionaryInternal.cs
- ObjectSet.cs
- BooleanStorage.cs
- LogicalTreeHelper.cs
- EventManager.cs
- ManagedIStream.cs
- ImageSourceValueSerializer.cs
- SynchronizationHandlesCodeDomSerializer.cs
- IntegerValidator.cs
- KeyboardDevice.cs
- CompilerParameters.cs