Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / SecurityUniqueId.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypeElement.cs
- CatalogZoneDesigner.cs
- TypeDependencyAttribute.cs
- DataSourceXmlElementAttribute.cs
- InternalPermissions.cs
- _FtpDataStream.cs
- Attributes.cs
- ProxyGenerator.cs
- WorkflowMarkupSerializationManager.cs
- ContentHostHelper.cs
- RecordsAffectedEventArgs.cs
- EventHandlersStore.cs
- SimpleWorkerRequest.cs
- EntityDataSourceDesigner.cs
- NumberFunctions.cs
- MailHeaderInfo.cs
- XmlBinaryWriterSession.cs
- Point3DConverter.cs
- ConfigurationValues.cs
- TreeView.cs
- LazyTextWriterCreator.cs
- ToolStripPanelCell.cs
- CreateDataSourceDialog.cs
- PropertyDescriptorComparer.cs
- metadatamappinghashervisitor.cs
- NumericExpr.cs
- WebPartTransformer.cs
- EventLog.cs
- CompressEmulationStream.cs
- Image.cs
- DataBindingList.cs
- LocalsItemDescription.cs
- BitmapMetadata.cs
- ToolStripContentPanelRenderEventArgs.cs
- CryptoKeySecurity.cs
- DaylightTime.cs
- FixedHighlight.cs
- OutOfProcStateClientManager.cs
- ContentValidator.cs
- SimpleModelProvider.cs
- WindowsSysHeader.cs
- ColumnWidthChangedEvent.cs
- XmlSerializerFactory.cs
- ContainerSelectorBehavior.cs
- OrderByExpression.cs
- ErrorFormatterPage.cs
- ItemChangedEventArgs.cs
- FormsAuthentication.cs
- SecurityToken.cs
- XPathAncestorIterator.cs
- MDIControlStrip.cs
- InstanceView.cs
- DataListGeneralPage.cs
- BuilderPropertyEntry.cs
- ControllableStoryboardAction.cs
- DecoderFallbackWithFailureFlag.cs
- Facet.cs
- ServiceMemoryGates.cs
- StylusButtonEventArgs.cs
- ParseNumbers.cs
- X500Name.cs
- ConfigUtil.cs
- CheckBoxBaseAdapter.cs
- Line.cs
- AliasedSlot.cs
- CompiledQuery.cs
- XmlSchema.cs
- AsynchronousChannelMergeEnumerator.cs
- Debug.cs
- Win32SafeHandles.cs
- UICuesEvent.cs
- Material.cs
- TransformDescriptor.cs
- ScriptingScriptResourceHandlerSection.cs
- SqlNotificationEventArgs.cs
- Journal.cs
- CallbackValidator.cs
- BlobPersonalizationState.cs
- ExpressionPrinter.cs
- Component.cs
- _NegotiateClient.cs
- DocumentApplicationJournalEntry.cs
- PageResolution.cs
- XmlComment.cs
- ListControl.cs
- XPathDocumentIterator.cs
- CompModSwitches.cs
- SettingsProperty.cs
- BitmapCacheBrush.cs
- TextHintingModeValidation.cs
- WindowCollection.cs
- TreePrinter.cs
- TrackingStringDictionary.cs
- SourceFilter.cs
- DrawingServices.cs
- Soap.cs
- HttpListenerRequest.cs
- WrapPanel.cs
- EntityDescriptor.cs
- AsynchronousChannelMergeEnumerator.cs