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
- TextEffectCollection.cs
- XPathDescendantIterator.cs
- DataGridViewCellPaintingEventArgs.cs
- SqlTransaction.cs
- StatusBarPanel.cs
- CallbackHandler.cs
- ImageSource.cs
- XslAstAnalyzer.cs
- WCFServiceClientProxyGenerator.cs
- ItemCollection.cs
- SQLResource.cs
- Permission.cs
- Misc.cs
- BitmapFrameEncode.cs
- WrappedReader.cs
- PageHandlerFactory.cs
- WindowsListViewGroup.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SBCSCodePageEncoding.cs
- NCryptNative.cs
- BindingExpressionUncommonField.cs
- Schema.cs
- GetIndexBinder.cs
- ServicesUtilities.cs
- DataGridViewHeaderCell.cs
- CustomAttribute.cs
- SchemaEntity.cs
- BufferedStream.cs
- SecurityKeyUsage.cs
- EtwTrackingBehavior.cs
- DataControlButton.cs
- Parser.cs
- MetabaseServerConfig.cs
- BeginEvent.cs
- IHttpResponseInternal.cs
- Cursors.cs
- DataProviderNameConverter.cs
- NumericExpr.cs
- Speller.cs
- BitmapCodecInfoInternal.cs
- StrongNameKeyPair.cs
- Match.cs
- Command.cs
- Vector3DAnimationBase.cs
- ObjectDataSourceChooseMethodsPanel.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ReflectTypeDescriptionProvider.cs
- WebSysDefaultValueAttribute.cs
- PermissionAttributes.cs
- COM2IPerPropertyBrowsingHandler.cs
- RbTree.cs
- UnsafeNativeMethods.cs
- securitycriticaldataformultiplegetandset.cs
- SizeConverter.cs
- ConditionalAttribute.cs
- ContractReference.cs
- StringToken.cs
- HierarchicalDataSourceDesigner.cs
- ConstraintEnumerator.cs
- XamlDesignerSerializationManager.cs
- WebDescriptionAttribute.cs
- ComboBoxDesigner.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- MailHeaderInfo.cs
- RubberbandSelector.cs
- CommonProperties.cs
- NavigatorOutput.cs
- ErrorStyle.cs
- HttpsTransportElement.cs
- ArgumentException.cs
- ViewStateException.cs
- TcpClientSocketManager.cs
- StateWorkerRequest.cs
- PreviewPageInfo.cs
- ClientTargetSection.cs
- FloaterParagraph.cs
- CacheChildrenQuery.cs
- SoapAttributeOverrides.cs
- WindowsSolidBrush.cs
- EntityCollection.cs
- XhtmlBasicLabelAdapter.cs
- ZipIOExtraField.cs
- CompositeControl.cs
- SelectorItemAutomationPeer.cs
- ISO2022Encoding.cs
- PropertyMappingExceptionEventArgs.cs
- RegexReplacement.cs
- Gdiplus.cs
- GlyphsSerializer.cs
- _HeaderInfo.cs
- ClientSideQueueItem.cs
- ReferencedCategoriesDocument.cs
- TextCollapsingProperties.cs
- View.cs
- GridViewDeletedEventArgs.cs
- CustomErrorsSectionWrapper.cs
- WorkflowOperationErrorHandler.cs
- WebPartZone.cs
- FixedPageStructure.cs
- HwndStylusInputProvider.cs