Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / SecurityUniqueId.cs / 1 / SecurityUniqueId.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel { using System.Globalization; using System.Threading; class SecurityUniqueId { static long nextId = 0; static string commonPrefix = "uuid-" + Guid.NewGuid().ToString() + "-"; long id; string prefix; string val; SecurityUniqueId(string prefix, long id) { this.id = id; this.prefix = prefix; this.val = null; } public static SecurityUniqueId Create() { return SecurityUniqueId.Create(commonPrefix); } public static SecurityUniqueId Create(string prefix) { return new SecurityUniqueId(prefix, Interlocked.Increment(ref nextId)); } public string Value { get { if (this.val == null) this.val = this.prefix + this.id.ToString(CultureInfo.InvariantCulture); return this.val; } } } } // 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
- MatrixStack.cs
- HitTestDrawingContextWalker.cs
- ScalarType.cs
- NoPersistProperty.cs
- OleCmdHelper.cs
- BufferModeSettings.cs
- RtfNavigator.cs
- ThreadPool.cs
- MatrixAnimationBase.cs
- PasswordTextNavigator.cs
- RtfToXamlReader.cs
- WebPartEditVerb.cs
- Evidence.cs
- XsltArgumentList.cs
- ComplexPropertyEntry.cs
- DynamicActivityXamlReader.cs
- IPeerNeighbor.cs
- Int64AnimationBase.cs
- GenericIdentity.cs
- AuthenticationModuleElement.cs
- RoutedPropertyChangedEventArgs.cs
- HttpHandlerAction.cs
- SoapFault.cs
- SHA1Managed.cs
- RemotingAttributes.cs
- DocumentViewerConstants.cs
- RegexMatch.cs
- Environment.cs
- EntityViewGenerationConstants.cs
- EnvironmentPermission.cs
- MimeReflector.cs
- NegationPusher.cs
- SecureUICommand.cs
- StorageEndPropertyMapping.cs
- PackageRelationshipSelector.cs
- MiniLockedBorderGlyph.cs
- MetadataItemEmitter.cs
- EntityTypeBase.cs
- KnownTypesProvider.cs
- AdornerDecorator.cs
- DiscoveryDocumentSerializer.cs
- StrongName.cs
- RenderingEventArgs.cs
- RawStylusInputCustomData.cs
- EditorOptionAttribute.cs
- QilReference.cs
- EventlogProvider.cs
- StatusBarDrawItemEvent.cs
- Label.cs
- FileClassifier.cs
- RequestTimeoutManager.cs
- PropertyCollection.cs
- AssertFilter.cs
- Delegate.cs
- CmsUtils.cs
- CapabilitiesAssignment.cs
- OleDbRowUpdatedEvent.cs
- EdmConstants.cs
- CharacterBufferReference.cs
- DataGridViewColumnHeaderCell.cs
- ObjectListTitleAttribute.cs
- TextProviderWrapper.cs
- DataGridViewCell.cs
- NetworkAddressChange.cs
- Pair.cs
- PageAdapter.cs
- DecimalAnimationUsingKeyFrames.cs
- DataGridCaption.cs
- PostBackOptions.cs
- TryExpression.cs
- HttpVersion.cs
- XmlSchemaSimpleContentRestriction.cs
- SiteMapNodeCollection.cs
- ResourceDescriptionAttribute.cs
- WizardPanelChangingEventArgs.cs
- KnownColorTable.cs
- BrushMappingModeValidation.cs
- PolicyUnit.cs
- IssuanceTokenProviderBase.cs
- CorruptingExceptionCommon.cs
- DataStreams.cs
- HttpGetServerProtocol.cs
- TextRangeBase.cs
- VisualProxy.cs
- DiagnosticsConfiguration.cs
- DataRelationPropertyDescriptor.cs
- RedistVersionInfo.cs
- DataSourceXmlElementAttribute.cs
- SectionInformation.cs
- _BaseOverlappedAsyncResult.cs
- LinqDataSourceDeleteEventArgs.cs
- TypefaceMetricsCache.cs
- PartManifestEntry.cs
- CustomErrorsSectionWrapper.cs
- XmlSchemaValidationException.cs
- FactoryId.cs
- StorageAssociationTypeMapping.cs
- SecurityManager.cs
- PerformanceCounter.cs
- Rotation3DAnimationUsingKeyFrames.cs