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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilInvokeLateBound.cs
- MetadataPropertyAttribute.cs
- LayoutExceptionEventArgs.cs
- QuestionEventArgs.cs
- SimpleTypeResolver.cs
- LabelEditEvent.cs
- _Win32.cs
- Int64Animation.cs
- HuffCodec.cs
- RequestCachePolicy.cs
- HttpModule.cs
- LongCountAggregationOperator.cs
- MetafileHeaderWmf.cs
- ClassicBorderDecorator.cs
- DoubleConverter.cs
- SmtpNegotiateAuthenticationModule.cs
- XmlCharacterData.cs
- KnownColorTable.cs
- RtfNavigator.cs
- Point3DAnimationUsingKeyFrames.cs
- TextBoxBase.cs
- Version.cs
- DiagnosticsConfiguration.cs
- XmlObjectSerializerReadContextComplexJson.cs
- RegexRunner.cs
- PersonalizationAdministration.cs
- SnapshotChangeTrackingStrategy.cs
- HttpDebugHandler.cs
- TriggerActionCollection.cs
- DispatcherFrame.cs
- ControlCollection.cs
- SourceItem.cs
- LockCookie.cs
- _ChunkParse.cs
- StringValidator.cs
- _NestedMultipleAsyncResult.cs
- PersonalizationStateInfoCollection.cs
- RichTextBox.cs
- SqlProcedureAttribute.cs
- DesignTable.cs
- CategoryAttribute.cs
- GenerateScriptTypeAttribute.cs
- ClientSponsor.cs
- EntryPointNotFoundException.cs
- AssemblyCollection.cs
- DataGridAutoFormat.cs
- _NativeSSPI.cs
- TableLayoutSettings.cs
- ActivityCompletionCallbackWrapper.cs
- TextTreeExtractElementUndoUnit.cs
- Int16AnimationUsingKeyFrames.cs
- InvariantComparer.cs
- GPPOINTF.cs
- XmlNodeReader.cs
- Peer.cs
- EventMappingSettingsCollection.cs
- TableItemPattern.cs
- recordstatefactory.cs
- SystemIPv4InterfaceProperties.cs
- PenLineCapValidation.cs
- EventItfInfo.cs
- DocumentGrid.cs
- DataBoundLiteralControl.cs
- RuntimeHandles.cs
- DataGridViewSelectedRowCollection.cs
- ServiceHostingEnvironment.cs
- FollowerQueueCreator.cs
- RequestCachePolicyConverter.cs
- BlockCollection.cs
- AdapterDictionary.cs
- SQlBooleanStorage.cs
- TextBoxRenderer.cs
- WebBrowserEvent.cs
- PreservationFileReader.cs
- ProjectionRewriter.cs
- InvalidateEvent.cs
- TogglePatternIdentifiers.cs
- ScriptControl.cs
- ThreadStartException.cs
- ResXResourceReader.cs
- WmlValidationSummaryAdapter.cs
- TextTreeTextNode.cs
- EventToken.cs
- Model3DGroup.cs
- DotAtomReader.cs
- ObjectItemNoOpAssemblyLoader.cs
- TemplateEditingVerb.cs
- Visual3D.cs
- DateTimeConverter.cs
- Button.cs
- HostVisual.cs
- EntityDataSourceDesigner.cs
- XmlBinaryWriter.cs
- DataReaderContainer.cs
- Convert.cs
- TraceUtils.cs
- GenericEnumConverter.cs
- KeyManager.cs
- SqlVisitor.cs
- DataBindingCollectionEditor.cs