Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / UriGenerator.cs / 1 / UriGenerator.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Threading; using System.Globalization; class UriGenerator { long id; string prefix; public UriGenerator() : this("uuid") { } public UriGenerator(string scheme) : this(scheme, ";") { } public UriGenerator(string scheme, string delimiter) { if (scheme == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("scheme")); if (scheme.Length == 0) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR.GetString(SR.UriGeneratorSchemeMustNotBeEmpty), "scheme")); prefix = string.Concat(scheme, ":", Guid.NewGuid().ToString(), delimiter, "id="); } public string Next() { long nextId = Interlocked.Increment(ref id); return prefix + nextId.ToString(CultureInfo.InvariantCulture); } } } // 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
- XmlDataSourceView.cs
- AspNetHostingPermission.cs
- Utils.cs
- ClrProviderManifest.cs
- XmlSchemaInclude.cs
- XmlDataImplementation.cs
- InputBinder.cs
- Span.cs
- SqlVisitor.cs
- ReferencedAssembly.cs
- COMException.cs
- CodeGeneratorOptions.cs
- PerfCounters.cs
- CharacterBuffer.cs
- unsafenativemethodstextservices.cs
- ListViewPagedDataSource.cs
- SiteOfOriginContainer.cs
- TargetPerspective.cs
- ContentPropertyAttribute.cs
- ListMarkerLine.cs
- CircleHotSpot.cs
- XslCompiledTransform.cs
- MouseOverProperty.cs
- OutputCacheSettingsSection.cs
- XmlSchemaDatatype.cs
- SubstitutionList.cs
- SizeFConverter.cs
- ByteAnimationBase.cs
- SingleAnimation.cs
- Label.cs
- HttpServerUtilityBase.cs
- DeferredTextReference.cs
- DataFormats.cs
- GridView.cs
- PeerCollaborationPermission.cs
- TypeForwardedToAttribute.cs
- Condition.cs
- SkinBuilder.cs
- WebZone.cs
- CallbackDebugBehavior.cs
- PixelShader.cs
- AssociationSetMetadata.cs
- XsdBuilder.cs
- ErrorStyle.cs
- ConfigurationSection.cs
- XmlILAnnotation.cs
- Light.cs
- TrustLevelCollection.cs
- NullRuntimeConfig.cs
- SharedDp.cs
- GridViewRowEventArgs.cs
- ViewPort3D.cs
- OpenFileDialog.cs
- GenericIdentity.cs
- BooleanExpr.cs
- ActivityExecutionFilter.cs
- PlanCompilerUtil.cs
- SqlDataAdapter.cs
- AncestorChangedEventArgs.cs
- PathFigureCollection.cs
- DBSqlParser.cs
- StateMachineWorkflowDesigner.cs
- Rfc2898DeriveBytes.cs
- Matrix.cs
- StreamGeometry.cs
- RepeaterDataBoundAdapter.cs
- MenuItem.cs
- WebPartEventArgs.cs
- IArgumentProvider.cs
- InputReport.cs
- InkPresenterAutomationPeer.cs
- ModuleConfigurationInfo.cs
- PseudoWebRequest.cs
- SuppressedPackageProperties.cs
- StrokeNodeOperations2.cs
- SafeMILHandle.cs
- WebPartTracker.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- TextEndOfParagraph.cs
- EvidenceTypeDescriptor.cs
- Vector3DAnimationUsingKeyFrames.cs
- DayRenderEvent.cs
- ObjectToIdCache.cs
- XmlDocument.cs
- ReadOnlyAttribute.cs
- DataGridCaption.cs
- RIPEMD160.cs
- DbMetaDataCollectionNames.cs
- DrawingContextDrawingContextWalker.cs
- CloudCollection.cs
- MediaTimeline.cs
- SpeechEvent.cs
- DesignerAdRotatorAdapter.cs
- CodeAttributeDeclarationCollection.cs
- ProfessionalColorTable.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- ProviderSettings.cs
- CurrencyWrapper.cs
- XmlWrappingWriter.cs
- OAVariantLib.cs