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
- ValidationService.cs
- HttpRequestCacheValidator.cs
- SQLResource.cs
- DataGridViewCellStateChangedEventArgs.cs
- TextServicesCompartmentEventSink.cs
- DbConnectionInternal.cs
- ContextQuery.cs
- SuppressIldasmAttribute.cs
- SqlServer2KCompatibilityCheck.cs
- TableLayoutCellPaintEventArgs.cs
- UnitySerializationHolder.cs
- CompletedAsyncResult.cs
- MatrixCamera.cs
- FullTextBreakpoint.cs
- PrintDocument.cs
- TrackingAnnotationCollection.cs
- OrderablePartitioner.cs
- TimeSpanValidatorAttribute.cs
- FreezableDefaultValueFactory.cs
- HeaderedItemsControl.cs
- SafeBitVector32.cs
- EntityUtil.cs
- ResourceSet.cs
- Parser.cs
- UnmanagedMarshal.cs
- CommandDevice.cs
- InputScopeAttribute.cs
- SafeRegistryHandle.cs
- CodeCatchClause.cs
- XmlNamespaceManager.cs
- Duration.cs
- StackBuilderSink.cs
- XMLSyntaxException.cs
- GregorianCalendar.cs
- TextSpan.cs
- TableStyle.cs
- ImageListStreamer.cs
- ToolStripItem.cs
- SoapIgnoreAttribute.cs
- ScriptReference.cs
- CompositeClientFormatter.cs
- InputLangChangeEvent.cs
- XhtmlBasicTextBoxAdapter.cs
- EncoderParameter.cs
- TextRunCache.cs
- SystemResources.cs
- ReadOnlyAttribute.cs
- MemberHolder.cs
- ReflectionUtil.cs
- LinkButton.cs
- RootBrowserWindowProxy.cs
- TextServicesLoader.cs
- SafeFileMappingHandle.cs
- WindowsFormsHost.cs
- NavigatingCancelEventArgs.cs
- RequestCachingSection.cs
- QueryResultOp.cs
- DeferredElementTreeState.cs
- PageParserFilter.cs
- OutgoingWebResponseContext.cs
- OdbcTransaction.cs
- FlatButtonAppearance.cs
- ControlPropertyNameConverter.cs
- TypeListConverter.cs
- HandlerBase.cs
- PropertyChangingEventArgs.cs
- DockProviderWrapper.cs
- SecurityException.cs
- xdrvalidator.cs
- SettingsAttributeDictionary.cs
- ResourceReferenceExpressionConverter.cs
- safePerfProviderHandle.cs
- HttpResponseHeader.cs
- DotExpr.cs
- ContentOperations.cs
- StaticSiteMapProvider.cs
- DependencyPropertyValueSerializer.cs
- MissingSatelliteAssemblyException.cs
- PerfCounterSection.cs
- EntityViewGenerator.cs
- JobCollate.cs
- SpecialFolderEnumConverter.cs
- EventLogPermission.cs
- ImageKeyConverter.cs
- DynamicMetaObjectBinder.cs
- BaseContextMenu.cs
- XmlSerializer.cs
- UniqueIdentifierService.cs
- ErrorFormatterPage.cs
- ExtendedPropertyDescriptor.cs
- DataGridViewImageColumn.cs
- OracleException.cs
- NativeMethods.cs
- basevalidator.cs
- ListViewGroup.cs
- DesigntimeLicenseContext.cs
- Axis.cs
- IisNotInstalledException.cs
- XmlSchemaSequence.cs
- SqlAliasesReferenced.cs