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
- SymLanguageVendor.cs
- DependencyProperty.cs
- InputReferenceExpression.cs
- HttpResponse.cs
- GetKeyedHashRequest.cs
- ValueTypeFixupInfo.cs
- SystemFonts.cs
- LeafCellTreeNode.cs
- precedingsibling.cs
- ArraySet.cs
- TextAnchor.cs
- PrivilegedConfigurationManager.cs
- LogEntryHeaderSerializer.cs
- UnmanagedMarshal.cs
- QilTernary.cs
- ProcessInfo.cs
- SqlRecordBuffer.cs
- URL.cs
- CellParaClient.cs
- RectangleConverter.cs
- LinkLabel.cs
- WindowsGraphics2.cs
- ServiceOperationParameter.cs
- ClientScriptManagerWrapper.cs
- ContentHostHelper.cs
- HostProtectionPermission.cs
- SchemaNamespaceManager.cs
- ScrollContentPresenter.cs
- Int32Storage.cs
- FamilyCollection.cs
- WbmpConverter.cs
- StringPropertyBuilder.cs
- RelatedPropertyManager.cs
- Ticks.cs
- XmlStreamStore.cs
- Pool.cs
- XmlCharType.cs
- UriTemplateVariablePathSegment.cs
- SByteConverter.cs
- SeparatorAutomationPeer.cs
- XamlStyleSerializer.cs
- TextTreeRootTextBlock.cs
- SimplePropertyEntry.cs
- FilteredAttributeCollection.cs
- FixedSOMPageConstructor.cs
- PanelStyle.cs
- HtmlInputCheckBox.cs
- HealthMonitoringSectionHelper.cs
- CodeObjectCreateExpression.cs
- TdsParser.cs
- ElementProxy.cs
- DecimalAverageAggregationOperator.cs
- FullTrustAssemblyCollection.cs
- Semaphore.cs
- PackagePartCollection.cs
- CodeArrayCreateExpression.cs
- KeyConverter.cs
- FunctionDetailsReader.cs
- _BasicClient.cs
- GridViewEditEventArgs.cs
- SqlDataRecord.cs
- PassportAuthentication.cs
- RegexTree.cs
- RelationshipDetailsRow.cs
- RawStylusInputCustomDataList.cs
- CodeIdentifier.cs
- CannotUnloadAppDomainException.cs
- LocalClientSecuritySettingsElement.cs
- ZipIOExtraField.cs
- TextView.cs
- Mouse.cs
- ConfigurationLockCollection.cs
- XmlSchemaInclude.cs
- NonParentingControl.cs
- ExtractorMetadata.cs
- Comparer.cs
- DocumentViewerHelper.cs
- WsdlImporterElement.cs
- CreateUserWizard.cs
- AuthorizationRuleCollection.cs
- DbRetry.cs
- ProfileEventArgs.cs
- WebServiceAttribute.cs
- ValidationErrorEventArgs.cs
- PageParserFilter.cs
- SignatureConfirmations.cs
- DataGridViewBindingCompleteEventArgs.cs
- Ref.cs
- PasswordBoxAutomationPeer.cs
- IntSecurity.cs
- HTTPNotFoundHandler.cs
- ZipIOCentralDirectoryFileHeader.cs
- EtwProvider.cs
- DataServiceRequestException.cs
- Int32Converter.cs
- ByteRangeDownloader.cs
- TransformationRules.cs
- SharedConnectionWorkflowTransactionService.cs
- FormViewPageEventArgs.cs
- RightsManagementEncryptedStream.cs