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
- HttpRawResponse.cs
- ProgressBar.cs
- RichTextBox.cs
- PaintValueEventArgs.cs
- ObjectQuery.cs
- Vector3DCollectionConverter.cs
- SynchronizedRandom.cs
- AssemblyUtil.cs
- SchemaImporterExtensionElement.cs
- ConvertEvent.cs
- UserControlBuildProvider.cs
- ImportCatalogPart.cs
- _UriTypeConverter.cs
- TypeToken.cs
- SqlInternalConnectionTds.cs
- RowType.cs
- _HeaderInfoTable.cs
- Grid.cs
- Conditional.cs
- TransportContext.cs
- WebPartTransformerCollection.cs
- MetafileHeader.cs
- AbandonedMutexException.cs
- Debug.cs
- MultipleViewProviderWrapper.cs
- ApplicationActivator.cs
- NavigationService.cs
- IMembershipProvider.cs
- ResizeGrip.cs
- ComponentChangingEvent.cs
- RegexCapture.cs
- PrintingPermission.cs
- TextElementEnumerator.cs
- ProxyWebPart.cs
- WebEventTraceProvider.cs
- DesigntimeLicenseContext.cs
- Brush.cs
- Point3DCollectionConverter.cs
- EventManager.cs
- LingerOption.cs
- ValidationError.cs
- Guid.cs
- AttachmentService.cs
- BitmapCodecInfoInternal.cs
- ImageAttributes.cs
- WebPartConnectionsCancelEventArgs.cs
- Point3DAnimationBase.cs
- TableLayout.cs
- TextHidden.cs
- ACL.cs
- SafeReversePInvokeHandle.cs
- TextContainerChangeEventArgs.cs
- SqlUDTStorage.cs
- DirectoryInfo.cs
- TraceHandler.cs
- NetworkStream.cs
- HtmlPhoneCallAdapter.cs
- ConstraintStruct.cs
- DataGridViewRowCollection.cs
- Int16Converter.cs
- BuildDependencySet.cs
- RawStylusInputCustomData.cs
- HandlerWithFactory.cs
- WorkflowViewElement.cs
- FlowLayout.cs
- GeneralTransform2DTo3D.cs
- ToolStripGripRenderEventArgs.cs
- PageFunction.cs
- Variant.cs
- ObjectReferenceStack.cs
- FullTextState.cs
- MultiViewDesigner.cs
- CrossSiteScriptingValidation.cs
- MenuItemStyleCollection.cs
- ExtensionDataReader.cs
- OrderByBuilder.cs
- DivideByZeroException.cs
- ListViewUpdatedEventArgs.cs
- ObjRef.cs
- JavaScriptObjectDeserializer.cs
- ArgumentReference.cs
- SafeNativeMethods.cs
- TypeToken.cs
- QilInvokeLateBound.cs
- JsonObjectDataContract.cs
- SiteMapNodeItemEventArgs.cs
- initElementDictionary.cs
- AliasedSlot.cs
- ConfigurationStrings.cs
- XmlAnyElementAttribute.cs
- DataGridViewCheckBoxCell.cs
- SecurityHelper.cs
- ZoneButton.cs
- XPathMultyIterator.cs
- IChannel.cs
- DurableInstanceContextProvider.cs
- WebPartZoneCollection.cs
- FileDialogCustomPlace.cs
- TextTreeInsertElementUndoUnit.cs
- RowUpdatedEventArgs.cs