Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / KeyNameIdentifierClause.cs / 1 / KeyNameIdentifierClause.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security { using System.Globalization; using System.ServiceModel; using System.IdentityModel.Tokens; public class KeyNameIdentifierClause : SecurityKeyIdentifierClause { string keyName; public KeyNameIdentifierClause(string keyName) : base(null) { if (keyName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("keyName"); } this.keyName = keyName; } public string KeyName { get { return this.keyName; } } public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { KeyNameIdentifierClause that = keyIdentifierClause as KeyNameIdentifierClause; // PreSharp Bug: Parameter 'that' to this public method must be validated: A null-dereference can occur here. #pragma warning suppress 56506 return ReferenceEquals(this, that) || (that != null && that.Matches(this.keyName)); } public bool Matches(string keyName) { return this.keyName == keyName; } public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "KeyNameIdentifierClause(KeyName = '{0}')", this.KeyName); } } } // 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
- ProviderBase.cs
- XmlSchemaIdentityConstraint.cs
- QilCloneVisitor.cs
- HtmlInputImage.cs
- HtmlTableCellCollection.cs
- BaseTreeIterator.cs
- SaveFileDialog.cs
- ObjectStorage.cs
- DropDownButton.cs
- LiteralText.cs
- DataServiceConfiguration.cs
- BitmapMetadata.cs
- DocumentPaginator.cs
- DoubleCollection.cs
- OperationContextScope.cs
- SqlCommand.cs
- DeferredReference.cs
- FlowPosition.cs
- MultiView.cs
- AutomationInteropProvider.cs
- _NTAuthentication.cs
- DocumentViewerConstants.cs
- AdRotator.cs
- ContractListAdapter.cs
- PageBreakRecord.cs
- OledbConnectionStringbuilder.cs
- NativeDirectoryServicesQueryAPIs.cs
- GenericAuthenticationEventArgs.cs
- VariableReference.cs
- GraphicsPathIterator.cs
- Registry.cs
- TimeEnumHelper.cs
- WebMessageEncodingElement.cs
- ListItemCollection.cs
- FrameworkElement.cs
- MethodBody.cs
- HScrollProperties.cs
- QuaternionAnimationUsingKeyFrames.cs
- BoundsDrawingContextWalker.cs
- ProgressChangedEventArgs.cs
- MetadataUtil.cs
- PtsCache.cs
- FormatConvertedBitmap.cs
- FontDialog.cs
- CreationContext.cs
- ModelToObjectValueConverter.cs
- WeakReference.cs
- UnhandledExceptionEventArgs.cs
- OutputCacheSettings.cs
- SecurityDescriptor.cs
- PageThemeParser.cs
- EventArgs.cs
- ImageEditor.cs
- FileDataSourceCache.cs
- EntityViewGenerator.cs
- ExpressionBuilderCollection.cs
- TraceListeners.cs
- TableParagraph.cs
- LicFileLicenseProvider.cs
- BaseTransportHeaders.cs
- AssemblyCacheEntry.cs
- XmlNamespaceMapping.cs
- PartialList.cs
- SQLBytes.cs
- XamlFigureLengthSerializer.cs
- PenLineJoinValidation.cs
- GenericEnumConverter.cs
- ClientReliableChannelBinder.cs
- TrackBar.cs
- ObjectNotFoundException.cs
- CounterSampleCalculator.cs
- DataSourceHelper.cs
- RenderDataDrawingContext.cs
- MimeTypeMapper.cs
- PassportPrincipal.cs
- EventWaitHandle.cs
- IItemProperties.cs
- Matrix3DStack.cs
- UseManagedPresentationBindingElementImporter.cs
- EdmItemError.cs
- ValidatedControlConverter.cs
- ContainsRowNumberChecker.cs
- BaseCodePageEncoding.cs
- ProfileSettings.cs
- WsdlEndpointConversionContext.cs
- MultiView.cs
- BinaryConverter.cs
- LoginName.cs
- MethodAccessException.cs
- HScrollProperties.cs
- FormsAuthenticationUserCollection.cs
- TextBoxAutomationPeer.cs
- InstalledFontCollection.cs
- XmlBoundElement.cs
- ResourcesChangeInfo.cs
- RetrieveVirtualItemEventArgs.cs
- Point.cs
- InheritanceAttribute.cs
- XmlFileEditor.cs
- DataGridViewCheckBoxCell.cs