Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / SecurityCapabilities.cs / 1 / SecurityCapabilities.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Net.Security; class SecurityCapabilities : ISecurityCapabilities { internal bool supportsServerAuth; internal bool supportsClientAuth; internal bool supportsClientWindowsIdentity; internal ProtectionLevel requestProtectionLevel; internal ProtectionLevel responseProtectionLevel; public SecurityCapabilities(bool supportsClientAuth, bool supportsServerAuth, bool supportsClientWindowsIdentity, ProtectionLevel requestProtectionLevel, ProtectionLevel responseProtectionLevel) { this.supportsClientAuth = supportsClientAuth; this.supportsServerAuth = supportsServerAuth; this.supportsClientWindowsIdentity = supportsClientWindowsIdentity; this.requestProtectionLevel = requestProtectionLevel; this.responseProtectionLevel = responseProtectionLevel; } public ProtectionLevel SupportedRequestProtectionLevel { get { return requestProtectionLevel; } } public ProtectionLevel SupportedResponseProtectionLevel { get { return responseProtectionLevel; } } public bool SupportsClientAuthentication { get { return supportsClientAuth; } } public bool SupportsClientWindowsIdentity { get { return supportsClientWindowsIdentity; } } public bool SupportsServerAuthentication { get { return supportsServerAuth; } } static SecurityCapabilities None { get { return new SecurityCapabilities(false, false, false, ProtectionLevel.None, ProtectionLevel.None); } } internal static bool IsEqual(ISecurityCapabilities capabilities1, ISecurityCapabilities capabilities2) { if (capabilities1 == null) { capabilities1 = SecurityCapabilities.None; } if (capabilities2 == null) { capabilities2 = SecurityCapabilities.None; } if (capabilities1.SupportedRequestProtectionLevel != capabilities2.SupportedRequestProtectionLevel) { return false; } if (capabilities1.SupportedResponseProtectionLevel != capabilities2.SupportedResponseProtectionLevel) { return false; } if (capabilities1.SupportsClientAuthentication != capabilities2.SupportsClientAuthentication) { return false; } if (capabilities1.SupportsClientWindowsIdentity != capabilities2.SupportsClientWindowsIdentity) { return false; } if (capabilities1.SupportsServerAuthentication != capabilities2.SupportsServerAuthentication) { return false; } return true; } } } // 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
- SurrogateEncoder.cs
- MediaPlayer.cs
- TypedRowHandler.cs
- TrustManager.cs
- ApplicationSettingsBase.cs
- Expressions.cs
- BaseCAMarshaler.cs
- GridItemProviderWrapper.cs
- DataSourceCacheDurationConverter.cs
- DecimalConverter.cs
- HttpServerUtilityBase.cs
- DebugView.cs
- XslAst.cs
- NopReturnReader.cs
- ServicePoint.cs
- DataListGeneralPage.cs
- FirstMatchCodeGroup.cs
- SqlMethodCallConverter.cs
- HtmlElement.cs
- GenerateScriptTypeAttribute.cs
- x509utils.cs
- documentation.cs
- PackagePart.cs
- XPathQilFactory.cs
- MasterPageBuildProvider.cs
- BitmapEditor.cs
- DragEvent.cs
- VersionValidator.cs
- SymbolType.cs
- SamlDoNotCacheCondition.cs
- SafeArchiveContext.cs
- oledbmetadatacolumnnames.cs
- ContextTokenTypeConverter.cs
- SecurityResources.cs
- GlobalizationSection.cs
- MailMessageEventArgs.cs
- LineSegment.cs
- shaperfactory.cs
- ClientBuildManagerCallback.cs
- DelegateBodyWriter.cs
- EventWaitHandle.cs
- WinFormsSpinner.cs
- ResourceManager.cs
- StringAttributeCollection.cs
- SQLMoney.cs
- FileNotFoundException.cs
- NetSectionGroup.cs
- securestring.cs
- TreeViewEvent.cs
- MultiTrigger.cs
- BaseResourcesBuildProvider.cs
- SchemaNames.cs
- TransformConverter.cs
- SecurityKeyIdentifier.cs
- SqlUserDefinedAggregateAttribute.cs
- HealthMonitoringSectionHelper.cs
- DataViewSettingCollection.cs
- ScriptRegistrationManager.cs
- OdbcCommandBuilder.cs
- WsdlInspector.cs
- RtfControlWordInfo.cs
- ExpandCollapseProviderWrapper.cs
- StaticExtension.cs
- ResourceExpressionBuilder.cs
- Rules.cs
- TextParaLineResult.cs
- ValidatorCollection.cs
- PersistencePipeline.cs
- CharUnicodeInfo.cs
- DeferredReference.cs
- util.cs
- DefaultHttpHandler.cs
- SelectedCellsCollection.cs
- XmlStringTable.cs
- ProtocolsConfigurationHandler.cs
- XNodeValidator.cs
- Timer.cs
- XmlSchemaComplexContentRestriction.cs
- BulletedListEventArgs.cs
- MediaTimeline.cs
- XmlHierarchicalEnumerable.cs
- SubMenuStyle.cs
- DockPanel.cs
- Registry.cs
- DesignerActionListCollection.cs
- Normalization.cs
- ListSurrogate.cs
- XmlNavigatorFilter.cs
- XmlTextAttribute.cs
- WebSysDescriptionAttribute.cs
- DynamicMethod.cs
- sqlpipe.cs
- ToolBar.cs
- CodeGroup.cs
- SystemIPAddressInformation.cs
- NativeMethods.cs
- MaxSessionCountExceededException.cs
- StrongBox.cs
- Page.cs
- DoubleKeyFrameCollection.cs