162 references to ToString
aspire (1)
DotNet\DotNetCliRunner.cs (1)
422var uniqueSocketPathSegment = Guid.NewGuid().ToString("N");
Aspire.Azure.Data.Tables.Tests (1)
ConformanceTests.cs (1)
109string tableName = $"a{Guid.NewGuid().ToString("N")}";
Aspire.Hosting.Tests (6)
SecretsStoreTests.cs (2)
19var userSecretsId = Guid.NewGuid().ToString("N"); 42var userSecretsId = Guid.NewGuid().ToString("N");
UserSecretsParameterDefaultTests.cs (3)
20var userSecretsId = Guid.NewGuid().ToString("N"); 50var userSecretsId = Guid.NewGuid().ToString("N"); 109return Guid.NewGuid().ToString("N");
Utils\UnixSocketHelper.cs (1)
18var uniqueSocketPathSegment = Guid.NewGuid().ToString("N");
CdkSample.ApiService (1)
Program.cs (1)
179public string Id { get; set; } = Guid.NewGuid().ToString("N");
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
3410Output.Write(checksumPragma.ChecksumAlgorithmId.ToString("B"));
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
77var shortId = Guid.NewGuid().ToString("N").Substring(0, 8);
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Metrics (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Metrics.Legacy (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N"));
UserJwtsTestFixture.cs (1)
66TestSecretsId = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
188{ "oauth_nonce", Guid.NewGuid().ToString("N") },
Microsoft.AspNetCore.BrowserTesting (1)
ContextInformation.cs (1)
57var identifier = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.Endpoints (1)
src\Shared\Components\ComponentMarker.cs (1)
93=> Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.Server (5)
Circuits\ServerComponentDeserializer.cs (4)
130Log.MismatchedInvocationId(_logger, previousInstance.InvocationId.ToString("N"), serverComponent.InvocationId.ToString("N")); 169Log.ExpiredInvocationId(_logger, serverComponent.InvocationId.ToString("N")); 186Log.ReusedDescriptorSequence(_logger, serverComponent.Sequence, serverComponent.InvocationId.ToString("N"));
src\Shared\Components\ComponentMarker.cs (1)
93=> Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.Web (1)
Forms\InputRadioGroup.cs (1)
15private readonly string _defaultGroupName = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Shared\Components\ComponentMarker.cs (1)
93=> Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
WebApplicationFactorySlnxTests.cs (1)
20_tempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")[..8]);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (2)
206{ key, value.ToString("N") } 215Assert.Equal(value.ToString("N"), roundTripValue);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
AttributeMatcherTest.cs (1)
99uniqueId: Guid.NewGuid().ToString("N"));
ComponentTagHelperTest.cs (1)
67Guid.NewGuid().ToString("N"));
EnvironmentTagHelperTest.cs (1)
216uniqueId: Guid.NewGuid().ToString("N"));
ImageTagHelperTest.cs (1)
340uniqueId: Guid.NewGuid().ToString("N"));
LinkTagHelperTest.cs (1)
1151uniqueId: Guid.NewGuid().ToString("N"));
PartialTagHelperTest.cs (1)
855Guid.NewGuid().ToString("N"));
PersistComponentStateTagHelperTest.cs (1)
244Guid.NewGuid().ToString("N"));
ScriptTagHelperTest.cs (1)
1100uniqueId: Guid.NewGuid().ToString("N"));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Infrastructure\TempDataSerializerTestBase.cs (2)
206{ key, value.ToString("N") } 215Assert.Equal(value.ToString("N"), roundTripValue);
Microsoft.AspNetCore.OutputCaching.Tests (9)
OutputCacheKeyProviderTests.cs (9)
89context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 184context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 197context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 210context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 223context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 238context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 253context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 272context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n"); 420context.CacheVaryByRules.CacheKeyPrefix = Guid.NewGuid().ToString("n");
Microsoft.AspNetCore.Server.IntegrationTesting (1)
ApplicationPublisher.cs (1)
122var tempPath = Path.GetTempPath() + Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployer.cs (1)
308_configPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
RedisProtocolBenchmark.cs (1)
117ids[i] = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (1)
319return Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTests.cs (1)
2053var invocationId = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
TestClient.cs (1)
319return Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
267var fileName = Guid.NewGuid().ToString("N") + ".sh";
Microsoft.AspNetCore.TestHost.Tests (1)
UseSolutionRelativeContentRootTests.cs (1)
18_tempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")[..8]);
Microsoft.CodeAnalysis (7)
Compilation.EmitStream.cs (1)
147tempFilePath = Path.Combine(tempDir, Guid.NewGuid().ToString("N"));
Compilation\DeterministicKeyBuilder.cs (1)
196internal static string GetGuidValue(in Guid guid) => guid.ToString("D");
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
82var shadowDirectoryName = Guid.NewGuid().ToString("N").ToLowerInvariant();
DocumentationComments\XmlDocumentationCommentTextReader.XmlStream.cs (2)
40private static readonly string s_rootElementName = "_" + Guid.NewGuid().ToString("N"); 41private static readonly string s_currentElementName = "_" + Guid.NewGuid().ToString("N");
Emit\ErrorType.cs (2)
28private static readonly string s_name = "Error" + Guid.NewGuid().ToString("B"); 217name: "Error" + Guid.NewGuid().ToString("B"),
Microsoft.CodeAnalysis.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.CSharp (1)
Binder\Binder_Expressions.cs (1)
7059guidString = System.Guid.Empty.ToString("D");
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
ExpressionCompilerUtilities.cs (1)
13return Guid.NewGuid().ToString("N");
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\DebuggingSessionTelemetry.cs (2)
82map["SolutionSessionId"] = data.SolutionSessionId.ToString("B").ToUpperInvariant(); 162=> new(projectId.ToString("B").ToUpperInvariant());
MetadataAsSource\MetadataAsSourceFileService.cs (1)
63var guidString = Guid.NewGuid().ToString("N");
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
33var directoryName = Guid.NewGuid().ToString("N");
Workspace\MiscellaneousFileUtilities.cs (1)
76var assemblyName = Guid.NewGuid().ToString("N");
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\SourceGeneratedDocumentUri.cs (2)
35var projectId = identity.DocumentId.ProjectId.Id.ToString(GuidFormat); 36var documentId = identity.DocumentId.Id.ToString(GuidFormat);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.Test.Utilities (1)
TestBase.cs (1)
50return Guid.NewGuid().ToString("D");
Microsoft.CodeAnalysis.Workspaces (6)
Shared\Utilities\XmlFragmentParser.cs (2)
127private static readonly string s_rootElementName = "_" + Guid.NewGuid().ToString("N"); 130internal static readonly string CurrentElementName = "_" + Guid.NewGuid().ToString("N");
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
82var shadowDirectoryName = Guid.NewGuid().ToString("N").ToLowerInvariant();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
328m["ProjectGuid"] = projectState.ProjectInfo.Attributes.TelemetryId.ToString("B");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
SolutionGeneration.cs (3)
203project.Guid.ToString("B"))); 270AddXElement(propertyGroup, "ProjectGuid", Guid.ToString("B")); 296AddXElement(xmlElement, "Project", projectReference.Guid.ToString("B"));
Microsoft.DotNet.ArcadeLogging (1)
MessageBuilder.cs (1)
42public void AddProperty(string name, Guid value) => AddProperty(name, value.ToString("D"));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\GetPkgDefAssemblyDependencyGuid.cs (1)
65item.SetMetadata(OutputMetadata, new Guid(reducedHash).ToString("B").ToUpperInvariant());
Microsoft.DotNet.Helix.JobSender (1)
JobDefinition.cs (1)
241string jobStartIdentifier = Guid.NewGuid().ToString("N");
Microsoft.DotNet.Helix.Sdk (1)
CommandPayload.cs (1)
23var dir = new DirectoryInfo(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")));
Microsoft.DotNet.Open.Api.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N"));
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
403string toolResponseId = Guid.NewGuid().ToString("N");
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
42=> prefix + "_" + Guid.NewGuid().ToString("N").Substring(0, 10).ToLowerInvariant();
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
738string messageId = Guid.NewGuid().ToString("N"); 1105MessageId = Guid.NewGuid().ToString("N") 1199MessageId = Guid.NewGuid().ToString("N"),
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N"));
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N"));
Microsoft.Extensions.SecretManager.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N"));
Microsoft.Maui.Controls (1)
Application\Application.cs (1)
505 var id = Guid.NewGuid().ToString("n");
Microsoft.ML.Data (3)
EntryPoints\EntryPointNode.cs (3)
65VarName = $"Var_{Guid.NewGuid().ToString("N")}"; 105VarName = $"Var_{Guid.NewGuid().ToString("N")}"; 140VarName = $"Var_{Guid.NewGuid().ToString("N")}";
Microsoft.ML.EntryPoints (2)
FeatureCombiner.cs (1)
202return Guid.NewGuid().ToString("N");
TrainTestMacro.cs (1)
115input.PipelineId = input.PipelineId ?? Guid.NewGuid().ToString("N");
Microsoft.ML.GenAI.Core (2)
CausalLMPipelineChatClient.cs (2)
52ResponseId = Guid.NewGuid().ToString("N"), 66string responseId = Guid.NewGuid().ToString("N");
Microsoft.VisualBasic.IntegrationTests (1)
InteractionTests.cs (1)
125private static string GetUniqueName() => Guid.NewGuid().ToString("D");
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\Devices\AudioTests.cs (1)
11private static string GetUniqueName() => Guid.NewGuid().ToString("D");
Microsoft\VisualBasic\MyServices\ClipboardProxyTests.cs (1)
22private static string GetUniqueText() => Guid.NewGuid().ToString("D");
Microsoft\VisualBasic\MyServices\RegistryProxyTests.cs (1)
40private static string GetUniqueName() => Guid.NewGuid().ToString("D");
Microsoft.VisualStudio.LanguageServices (1)
Snippets\SnippetExpansionClient.cs (1)
61private static readonly string s_fullMethodCallDescriptionSentinel = Guid.NewGuid().ToString("N");
MyFrontend (1)
Services\BasketServiceClient.cs (1)
47Id = Guid.NewGuid().ToString("N"),
OutputCachingSample (1)
Gravatar.cs (1)
10var hash = Guid.NewGuid().ToString("n");
PresentationCore (1)
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
332string wellFormedGuidString = guid.ToString("N");
PresentationFramework (1)
System\Windows\Controls\WebBrowser.cs (1)
537Debug.Assert(clsid.ToString("D") == CLSID.WebBrowser);
ReachFramework (1)
Serialization\XpsFontSubsetter.cs (1)
681string guidString = guid.ToString("N");
Roslyn.Diagnostics.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Security.TransportSecurity.IntegrationTests (10)
Http\ClientCredentialTypeTests.4.1.0.cs (6)
34string username = Guid.NewGuid().ToString("n").Substring(0, 8); 35string password = Guid.NewGuid().ToString("n").Substring(0, 16); 36string realm = Guid.NewGuid().ToString("n").Substring(0, 5); 95string username = Guid.NewGuid().ToString("n").Substring(0, 8); 96string password = Guid.NewGuid().ToString("n").Substring(0, 16); 97string realm = Guid.NewGuid().ToString("n").Substring(0, 5);
Https\ClientCredentialTypeTests.4.1.0.cs (4)
50username = Guid.NewGuid().ToString("n").Substring(0, 8); 51password = Guid.NewGuid().ToString("n").Substring(0, 16); 125username = Guid.NewGuid().ToString("n").Substring(0, 8); 126password = Guid.NewGuid().ToString("n").Substring(0, 16);
System.IO.MemoryMappedFiles (1)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
316string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
System.IO.Packaging (2)
System\IO\Packaging\InternalRelationshipCollection.cs (1)
599return string.Concat("R", Guid.NewGuid().ToString("N").Substring(0, TimestampLength));
System\IO\Packaging\PartBasedPackageProperties.cs (1)
731+ Guid.NewGuid().ToString(GuidStorageFormatString)
System.Private.CoreLib.Generators (1)
EventSourceGenerator.Emitter.cs (1)
60private {ec.ClassName}() : base(new Guid({ec.Guid.ToString("x").Replace("{", "").Replace("}", "")}), ""{ec.SourceName}"") {{ }}");
System.Private.Windows.Core.TestUtilities (1)
FileCleanupTestBase.cs (1)
50private static string GetUniqueName() => Guid.NewGuid().ToString("D");
System.Security.Cryptography (1)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (1)
746"netperm-" + Guid.NewGuid().ToString("B"),
System.Windows.Forms.Tests (1)
System\Windows\Forms\DynamicAxHost.cs (1)
15internal DynamicAxHost(ComClassFactory factory) : base(factory.ClassId.ToString("D"), 0)
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
131var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
131var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
131var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
131var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
Templates.Tests (1)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
131var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
Test.Utilities (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Text.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
VBCSCompiler.UnitTests (3)
BuildClientTests.cs (1)
32private readonly string _pipeName = Guid.NewGuid().ToString("N");
CompilerServerApiTest.cs (2)
38var pipeName = Guid.NewGuid().ToString("N"); 66var pipeName = Guid.NewGuid().ToString("N");
VisualBasicRuntimeTest (1)
Program.cs (1)
184private static string GetUniqueName() => Guid.NewGuid().ToString("D");