Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / SecurityContextKeyIdentifierClause.cs / 1 / SecurityContextKeyIdentifierClause.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security { using System.Globalization; using System.ServiceModel; using System.IdentityModel.Tokens; using System.Xml; public class SecurityContextKeyIdentifierClause : SecurityKeyIdentifierClause { readonly UniqueId contextId; readonly UniqueId generation; public SecurityContextKeyIdentifierClause(UniqueId contextId) : this(contextId, null) { } public SecurityContextKeyIdentifierClause(UniqueId contextId, UniqueId generation) : this(contextId, generation, null, 0) { } public SecurityContextKeyIdentifierClause(UniqueId contextId, UniqueId generation, byte[] derivationNonce, int derivationLength) : base(null, derivationNonce, derivationLength) { if (contextId == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contextId"); } this.contextId = contextId; this.generation = generation; } public UniqueId ContextId { get { return this.contextId; } } public UniqueId Generation { get { return this.generation; } } public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { SecurityContextKeyIdentifierClause that = keyIdentifierClause as SecurityContextKeyIdentifierClause; // 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.contextId, this.generation)); } public bool Matches(UniqueId contextId, UniqueId generation) { return contextId == this.contextId && generation == this.generation; } public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "SecurityContextKeyIdentifierClause(ContextId = '{0}', Generation = '{1}')", this.ContextId, this.Generation); } } } // 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
- ContextQuery.cs
- XsltCompileContext.cs
- UIElementIsland.cs
- __Error.cs
- RectAnimation.cs
- HttpHandlerActionCollection.cs
- FusionWrap.cs
- ExpressionsCollectionConverter.cs
- DataGridViewControlCollection.cs
- HtmlGenericControl.cs
- OdbcErrorCollection.cs
- EventProviderWriter.cs
- SmiXetterAccessMap.cs
- StrokeNodeOperations.cs
- XmlIgnoreAttribute.cs
- RetrieveVirtualItemEventArgs.cs
- infer.cs
- HttpHandlerActionCollection.cs
- BamlCollectionHolder.cs
- SqlConnectionFactory.cs
- StsCommunicationException.cs
- MembershipPasswordException.cs
- UnsafeNativeMethods.cs
- DoubleConverter.cs
- RijndaelManagedTransform.cs
- AssociationType.cs
- TextSearch.cs
- DispatcherHookEventArgs.cs
- Bidi.cs
- InteropExecutor.cs
- DataGridViewRowConverter.cs
- WorkflowTransactionOptions.cs
- InfoCardHelper.cs
- WindowsRegion.cs
- PipelineComponent.cs
- InfoCardKeyedHashAlgorithm.cs
- HTMLTextWriter.cs
- SByteStorage.cs
- BufferModesCollection.cs
- StackOverflowException.cs
- TableCellAutomationPeer.cs
- JsonByteArrayDataContract.cs
- DbProviderServices.cs
- QilVisitor.cs
- Clause.cs
- ElementNotAvailableException.cs
- XmlDomTextWriter.cs
- WebPartMenu.cs
- CreationContext.cs
- ResolveMatchesMessageCD1.cs
- ObfuscationAttribute.cs
- DataGridViewCellEventArgs.cs
- TimeZone.cs
- DocumentPageViewAutomationPeer.cs
- DataGridViewColumnEventArgs.cs
- TemplateControlBuildProvider.cs
- SecurityContext.cs
- DropShadowBitmapEffect.cs
- DocumentViewerAutomationPeer.cs
- XamlTypeMapper.cs
- ComponentChangedEvent.cs
- XmlILIndex.cs
- AsymmetricAlgorithm.cs
- CodeVariableReferenceExpression.cs
- ObfuscateAssemblyAttribute.cs
- GlyphCache.cs
- Point3DConverter.cs
- TextBoxView.cs
- DecimalConverter.cs
- Geometry3D.cs
- Highlights.cs
- HttpDateParse.cs
- SpecularMaterial.cs
- CodeStatementCollection.cs
- ParallelTimeline.cs
- DesignSurfaceCollection.cs
- ThumbAutomationPeer.cs
- ListBindingConverter.cs
- MultilineStringConverter.cs
- SqlProviderManifest.cs
- PasswordBox.cs
- WebControlParameterProxy.cs
- ObjectListItemCollection.cs
- XmlElementList.cs
- StatusBar.cs
- EntityRecordInfo.cs
- XslVisitor.cs
- MobileSysDescriptionAttribute.cs
- HtmlElementErrorEventArgs.cs
- InlineCollection.cs
- PaginationProgressEventArgs.cs
- EntityConnectionStringBuilderItem.cs
- Mapping.cs
- InvalidCommandTreeException.cs
- NullableIntMinMaxAggregationOperator.cs
- CommandBinding.cs
- SafeRightsManagementEnvironmentHandle.cs
- PointConverter.cs
- DiscreteKeyFrames.cs
- DoWhileDesigner.xaml.cs