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
- SwitchLevelAttribute.cs
- prompt.cs
- BooleanAnimationBase.cs
- Module.cs
- DomainLiteralReader.cs
- MetadataUtilsSmi.cs
- SmiMetaData.cs
- XmlSigningNodeWriter.cs
- BitmapEffect.cs
- DocumentPage.cs
- AssociationSetMetadata.cs
- HttpListenerRequest.cs
- TimeSpanValidator.cs
- QueryOptionExpression.cs
- XmlSchemaAppInfo.cs
- RootBrowserWindowAutomationPeer.cs
- PersonalizationEntry.cs
- XamlToRtfParser.cs
- EventLogTraceListener.cs
- ListComponentEditor.cs
- NTAccount.cs
- QueueProcessor.cs
- ZeroOpNode.cs
- DefaultPropertyAttribute.cs
- ContextStaticAttribute.cs
- ResumeStoryboard.cs
- ViewStateModeByIdAttribute.cs
- BindableTemplateBuilder.cs
- _SpnDictionary.cs
- ConstraintCollection.cs
- Encoding.cs
- ExternalDataExchangeClient.cs
- CurrentChangedEventManager.cs
- SymmetricAlgorithm.cs
- _NtlmClient.cs
- ArgumentException.cs
- FeatureSupport.cs
- EffectiveValueEntry.cs
- ComponentCommands.cs
- ScrollPattern.cs
- SqlProcedureAttribute.cs
- BaseResourcesBuildProvider.cs
- XsltQilFactory.cs
- WCFModelStrings.Designer.cs
- PropertyRef.cs
- WebPartExportVerb.cs
- NoResizeHandleGlyph.cs
- DocumentGridPage.cs
- XmlChoiceIdentifierAttribute.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- RenderTargetBitmap.cs
- StateMachineSubscriptionManager.cs
- TextLineBreak.cs
- MetadataItemSerializer.cs
- TableItemPatternIdentifiers.cs
- DataGridColumn.cs
- RelatedImageListAttribute.cs
- ColumnTypeConverter.cs
- CheckoutException.cs
- Control.cs
- CircleHotSpot.cs
- DocumentEventArgs.cs
- DrawListViewColumnHeaderEventArgs.cs
- PaperSource.cs
- TypeInformation.cs
- TextChange.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SerializationSectionGroup.cs
- Separator.cs
- BooleanProjectedSlot.cs
- DataBoundControlAdapter.cs
- CanExecuteRoutedEventArgs.cs
- QueryMath.cs
- GatewayIPAddressInformationCollection.cs
- DateTimeValueSerializer.cs
- PropertyEntry.cs
- UnsafeNativeMethods.cs
- SchemaInfo.cs
- BitSet.cs
- TransactionScopeDesigner.cs
- SchemaTableColumn.cs
- LayoutManager.cs
- VisualStateChangedEventArgs.cs
- PathBox.cs
- SqlDataSourceCache.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SystemIPAddressInformation.cs
- SiteMembershipCondition.cs
- MdImport.cs
- MonthChangedEventArgs.cs
- MemberExpressionHelper.cs
- CellIdBoolean.cs
- MasterPage.cs
- ItemsControlAutomationPeer.cs
- DecoratedNameAttribute.cs
- LinqDataView.cs
- FloaterBaseParagraph.cs
- TypeCollectionDesigner.xaml.cs
- ResizeBehavior.cs
- ImageMapEventArgs.cs