174 references to ToString
aspire (1)
DotNetCliRunner.cs (1)
346var 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)
20var userSecretsId = Guid.NewGuid().ToString("N"); 43var userSecretsId = Guid.NewGuid().ToString("N");
UserSecretsParameterDefaultTests.cs (3)
21var userSecretsId = Guid.NewGuid().ToString("N"); 51var userSecretsId = Guid.NewGuid().ToString("N"); 110return 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);
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)
90=> 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)
90=> 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)
90=> Guid.NewGuid().ToString("N");
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.Build (1)
Construction\Solution\SolutionFile.cs (1)
428private static string ToProjectGuidFormat(Guid id) => id.ToString("B").ToUpper();
Microsoft.Build.CommandLine.UnitTests (9)
XMake_Tests.cs (9)
1367directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")); 1986string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName; 2009string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName; 2280string guid = Guid.NewGuid().ToString("N"); 2313string guid1 = Guid.NewGuid().ToString("N"); 2314string guid2 = Guid.NewGuid().ToString("N"); 2360string guid1 = Guid.NewGuid().ToString("N"); 2361string guid2 = Guid.NewGuid().ToString("N"); 2769dest = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
Microsoft.Build.Engine.OM.UnitTests (2)
Construction\ProjectRootElement_Tests.cs (1)
634directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
Definition\Project_Tests.cs (1)
206string file = Path.GetTempPath() + Path.DirectorySeparatorChar + Guid.NewGuid().ToString("N");
Microsoft.Build.Engine.UnitTests (16)
BackEnd\BuildManager_Tests.cs (1)
3639string rootProjectPath = Path.Combine(shutdownProjectDirectory, String.Format(CultureInfo.InvariantCulture, "RootProj_{0}.proj", Guid.NewGuid().ToString("N")));
BuildEnvironmentHelper_Tests.cs (1)
516TempFolderRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
Construction\ProjectRootElement_Tests.cs (4)
32ObjectModelHelpers.CreateFileInTempProjectDirectory(Guid.NewGuid().ToString("N"), contents, Encoding.UTF8) : 33ObjectModelHelpers.CreateFileInTempProjectDirectory(Guid.NewGuid().ToString("N"), contents); 52ObjectModelHelpers.CreateFileInTempProjectDirectory(Guid.NewGuid().ToString("N"), contents, Encoding.UTF8) : 53ObjectModelHelpers.CreateFileInTempProjectDirectory(Guid.NewGuid().ToString("N"), contents);
Construction\SolutionProjectGenerator_Tests.cs (3)
2598string baseDirectory = Guid.NewGuid().ToString("N"); 2657string baseDirectory = Guid.NewGuid().ToString("N"); 2735string baseDirectory = Guid.NewGuid().ToString("N");
Evaluation\Evaluator_Tests.cs (2)
1258string filename1 = Guid.NewGuid().ToString("N"); 1259string filename2 = Guid.NewGuid().ToString("N");
FileLogger_Tests.cs (1)
338string directory = Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"));
Graph\IsolateProjects_Tests.cs (1)
142_env.SetTempPath(Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("N")), deleteTempDirectory: true);
InvalidProjectFileException_Tests.cs (2)
30string file = Path.GetTempPath() + Guid.NewGuid().ToString("N"); 62string file = Path.GetTempPath() + Guid.NewGuid().ToString("N");
SolutionFileBuilder.cs (1)
112.ToString("B")));
Microsoft.Build.Tasks.Core (4)
ManifestUtil\ComImporter.cs (1)
212string sclsid = clsid.ToString("B");
ManifestUtil\FileReference.cs (3)
164_tlbid = tlbId.ToString("B"); 165_clsid = clsId.ToString("B"); 251_tlbid = tlbId.ToString("B");
Microsoft.Build.Tasks.UnitTests (9)
Copy_Tests.cs (1)
1914string sourceFileEscaped = Path.GetTempPath() + "a%253A_" + Guid.NewGuid().ToString("N") + ".txt";
FileStateTests.cs (6)
366string file = Guid.NewGuid().ToString("N"); 376string file = Guid.NewGuid().ToString("N"); 384string file = Guid.NewGuid().ToString("N"); // presumably doesn't exist 394string file = Guid.NewGuid().ToString("N"); // presumably doesn't exist 402string file = Guid.NewGuid().ToString("N"); // presumably doesn't exist 410string file = Guid.NewGuid().ToString("N") + "\\x"; // presumably doesn't exist
WriteLinesToFile_Tests.cs (1)
301var file = Path.Combine(directory.Path, $"{Guid.NewGuid().ToString("N")}.tmp");
ZipDirectory_Tests.cs (1)
133SourceDirectory = new TaskItem(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")))
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
739project.FullPath = Path.Combine(TempProjectDir, "Temporary" + guid.ToString("N") + ".csproj"); 843s_tempProjectDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
Microsoft.CodeAnalysis (7)
Compilation.EmitStream.cs (1)
147tempFilePath = Path.Combine(tempDir, Guid.NewGuid().ToString("N"));
Compilation\DeterministicKeyBuilder.cs (1)
195internal 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)
27private static readonly string s_name = "Error" + Guid.NewGuid().ToString("B"); 216name: "Error" + Guid.NewGuid().ToString("B"),
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.CSharp (1)
Binder\Binder_Expressions.cs (1)
7050guidString = System.Guid.Empty.ToString("D");
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
ExpressionCompilerUtilities.cs (1)
13return Guid.NewGuid().ToString("N");
Microsoft.CodeAnalysis.Features (4)
EditAndContinue\DebuggingSessionTelemetry.cs (1)
158=> new(projectId.ToString("B").ToUpperInvariant());
MetadataAsSource\MetadataAsSourceFileService.cs (1)
61var guidString = Guid.NewGuid().ToString("N");
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
44var directoryName = Guid.NewGuid().ToString("N");
Workspace\MiscellaneousFileUtilities.cs (1)
62var assemblyName = Guid.NewGuid().ToString("N");
Microsoft.CodeAnalysis.Test.Utilities (1)
TestBase.cs (1)
50return Guid.NewGuid().ToString("D");
Microsoft.CodeAnalysis.Workspaces (4)
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 (1)
142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
SolutionGeneration.cs (3)
199project.Guid.ToString("B"))); 266AddXElement(propertyGroup, "ProjectGuid", Guid.ToString("B")); 292AddXElement(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)
384string toolResponseId = Guid.NewGuid().ToString("N");
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
108var responseId = Guid.NewGuid().ToString("N"); 138var responseId = 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)
592string messageId = Guid.NewGuid().ToString("N"); 959MessageId = Guid.NewGuid().ToString("N") 1053MessageId = 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");
MSBuild (1)
XMake.cs (1)
1862restoreGlobalProperties[MSBuildConstants.MSBuildRestoreSessionId] = Guid.NewGuid().ToString("D");
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");
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");
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"));
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");