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
- LazyLoadBehavior.cs
- HwndHost.cs
- FunctionUpdateCommand.cs
- ValueQuery.cs
- DesignerVerb.cs
- XamlToRtfParser.cs
- NoResizeHandleGlyph.cs
- ListBoxItemAutomationPeer.cs
- SecurityKeyIdentifier.cs
- SoapAttributes.cs
- ReadOnlyDataSource.cs
- EventHandlerList.cs
- StreamAsIStream.cs
- EntityDataSourceChangedEventArgs.cs
- MimeMultiPart.cs
- GridViewCommandEventArgs.cs
- LicenseContext.cs
- RangeBase.cs
- XmlMembersMapping.cs
- ReadOnlyMetadataCollection.cs
- DispatcherObject.cs
- ValueChangedEventManager.cs
- EDesignUtil.cs
- QilXmlReader.cs
- StyleCollection.cs
- DeferredReference.cs
- WorkflowViewService.cs
- DbParameterHelper.cs
- InkCollectionBehavior.cs
- OleServicesContext.cs
- EditorZoneBase.cs
- TemplateControlParser.cs
- DataRowView.cs
- __Filters.cs
- BitStack.cs
- SafeSystemMetrics.cs
- XomlSerializationHelpers.cs
- _TransmitFileOverlappedAsyncResult.cs
- AssemblyFilter.cs
- ImageAutomationPeer.cs
- rsa.cs
- WindowsImpersonationContext.cs
- SqlDataSourceCommandParser.cs
- GradientSpreadMethodValidation.cs
- CatalogZone.cs
- BuilderPropertyEntry.cs
- LinqDataSource.cs
- File.cs
- GenerateScriptTypeAttribute.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- OleDbCommandBuilder.cs
- DataViewListener.cs
- DataGridViewColumnEventArgs.cs
- SortFieldComparer.cs
- IdentityHolder.cs
- EdmItemCollection.cs
- InfoCardProofToken.cs
- SQLBinary.cs
- TcpTransportSecurityElement.cs
- Partitioner.cs
- WebControl.cs
- BatchWriter.cs
- GridViewDeletedEventArgs.cs
- SqlSupersetValidator.cs
- KeyGestureConverter.cs
- ImageListImage.cs
- HttpCookie.cs
- FunctionUpdateCommand.cs
- MenuAdapter.cs
- DebugTrace.cs
- HtmlInputControl.cs
- MasterPageParser.cs
- SpellerError.cs
- CollectionChangeEventArgs.cs
- PropertyBuilder.cs
- SmiRequestExecutor.cs
- ValueType.cs
- ConfigurationValues.cs
- PrefixQName.cs
- ServiceMetadataBehavior.cs
- BitmapScalingModeValidation.cs
- WebBrowserPermission.cs
- Quaternion.cs
- FileLogRecordHeader.cs
- MetadataItem.cs
- DllNotFoundException.cs
- WebBrowserProgressChangedEventHandler.cs
- XmlCharCheckingWriter.cs
- FilterQueryOptionExpression.cs
- OleDbEnumerator.cs
- Funcletizer.cs
- DataBindingValueUIHandler.cs
- SmiEventSink_DeferedProcessing.cs
- StatusBarPanel.cs
- ContextMarshalException.cs
- SqlTypesSchemaImporter.cs
- CollectionContainer.cs
- DataTableCollection.cs
- GeneralTransform3DGroup.cs
- DataGridItemEventArgs.cs