161 references to ToString
aspire (5)
Commands\Sdk\SdkDumpCommand.cs (1)
140var tempDir = Path.Combine(Path.GetTempPath(), "aspire-sdk-dump", Guid.NewGuid().ToString("N")[..8]);
Commands\Sdk\SdkGenerateCommand.cs (1)
118var tempDir = Path.Combine(Path.GetTempPath(), "aspire-sdk-gen", Guid.NewGuid().ToString("N")[..8]);
Diagnostics\FileLoggerProvider.cs (1)
42var id = Guid.NewGuid().ToString("N")[..8];
DotNet\DotNetCliRunner.cs (1)
94var uniqueSocketPathSegment = Guid.NewGuid().ToString("N");
Telemetry\MachineInformationProviderBase.cs (1)
75protected static string GenerateDeviceId() => Guid.NewGuid().ToString("D").ToLowerInvariant();
Aspire.Azure.Data.Tables.Tests (1)
ConformanceTests.cs (1)
112string tableName = $"a{Guid.NewGuid().ToString("N")}";
Aspire.Cli.Tests (1)
Commands\SecretCommandTests.cs (1)
22var userSecretsId = Guid.NewGuid().ToString("N");
Aspire.Deployment.EndToEnd.Tests (2)
AksStarterWithRedisDeploymentTests.cs (1)
58var redisPassword = Guid.NewGuid().ToString("N");
Helpers\AzureAuthenticationHelpers.cs (1)
117: Guid.NewGuid().ToString("N")[..8];
Aspire.Hosting (1)
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (1)
129var bundleId = Guid.NewGuid().ToString("N");
Aspire.Hosting.Docker.Tests (1)
DockerComposeTests.cs (1)
359var projectId = Guid.NewGuid().ToString("N")[..8];
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
94var randomSuffix = Guid.NewGuid().ToString("N")[..8];
Aspire.Hosting.RemoteHost (1)
JsonRpcServer.cs (1)
186var clientId = Guid.NewGuid().ToString("N")[..8]; // Short client identifier
Aspire.Hosting.Testing.Tests (1)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
68var uniqueId = Guid.NewGuid().ToString("N")[..8];
Aspire.Hosting.Tests (25)
DistributedApplicationBuilderTests.cs (4)
123var userSecretsId = Guid.NewGuid().ToString("N"); 144var assemblyUserSecretsId = Guid.NewGuid().ToString("N"); 145var configuredUserSecretsId = Guid.NewGuid().ToString("N"); 195var assemblyUserSecretsId = Guid.NewGuid().ToString("N");
Publishing\DeploymentStateManagerTests.cs (7)
108var sharedSha = Guid.NewGuid().ToString("N"); 158var sharedSha = Guid.NewGuid().ToString("N"); 241var sharedSha = Guid.NewGuid().ToString("N"); 356var sharedSha = Guid.NewGuid().ToString("N"); 388["AppHost:PathSha256"] = sha ?? Guid.NewGuid().ToString("N") 462["AppHost:PathSha256"] = Guid.NewGuid().ToString("N") 489["AppHost:PathSha256"] = Guid.NewGuid().ToString("N")
SecretsStoreTests.cs (2)
30var userSecretsId = Guid.NewGuid().ToString("N"); 55var userSecretsId = Guid.NewGuid().ToString("N");
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
68var uniqueId = Guid.NewGuid().ToString("N")[..8];
UserSecretsParameterDefaultTests.cs (10)
32var userSecretsId = Guid.NewGuid().ToString("N"); 66var userSecretsId = Guid.NewGuid().ToString("N"); 95var userSecretsId = Guid.NewGuid().ToString("N"); 145var userSecretsId = Guid.NewGuid().ToString("N"); 184var userSecretsId = Guid.NewGuid().ToString("N"); 223var userSecretsId = Guid.NewGuid().ToString("N"); 248var userSecretsId1 = Guid.NewGuid().ToString("N"); 249var userSecretsId2 = Guid.NewGuid().ToString("N"); 288var userSecretsId = Guid.NewGuid().ToString("N"); 383return Guid.NewGuid().ToString("N");
Utils\UnixSocketHelper.cs (1)
18var uniqueSocketPathSegment = Guid.NewGuid().ToString("N");
Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests (6)
BasicHttpTransportWithMessageCredentialSecurityTests.cs (3)
83username = Guid.NewGuid().ToString("n").Substring(0, 8); 132username = Guid.NewGuid().ToString("n").Substring(0, 8); 184username = Guid.NewGuid().ToString("n").Substring(0, 8);
WS2007HttpTransportWithMessageCredentialsSecurityTests.cs (1)
84username = Guid.NewGuid().ToString("n").Substring(0, 8);
WSHttpTransportWithMessageCredentialSecurityTests.cs (1)
85username = Guid.NewGuid().ToString("n").Substring(0, 8);
WSNetTcpTransportWithMessageCredentialSecurityTests.cs (1)
88username = Guid.NewGuid().ToString("n").Substring(0, 8);
CdkSample.ApiService (1)
Program.cs (1)
179public string Id { get; set; } = Guid.NewGuid().ToString("N");
dotnet (5)
Commands\Run\VirtualProjectBuildingCommand.cs (1)
408var sessionId = Guid.NewGuid().ToString("D");
Commands\Test\MTP\Terminal\FileUtilities.cs (1)
22string pathWithUpperCase = Path.Combine(Path.GetTempPath(), "CASESENSITIVETEST" + Guid.NewGuid().ToString("N"));
Commands\Test\MTP\TestApplication.cs (1)
33private readonly string _pipeName = NamedPipeServer.GetPipeName(Guid.NewGuid().ToString("N"));
Extensions\ProjectInstanceExtensions.cs (1)
17return projectGuid.ToString("B").ToUpper();
Telemetry\DevDeviceIDGetter.cs (1)
20deviceId = Guid.NewGuid().ToString("D").ToLowerInvariant();
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);
EventSourceGenerator (1)
EventSourceGenerator.Emitter.cs (1)
69private {ec.ClassName}() : base(""{ec.SourceName}"", new Guid({ec.Guid.ToString("x").Replace("{", "").Replace("}", "")})) {{ }}");
GenerateDocumentationAndConfigFiles (2)
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
189{ "oauth_nonce", Guid.NewGuid().ToString("N") },
Microsoft.AspNetCore.Components.Endpoints (1)
src\aspnetcore\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\aspnetcore\src\Shared\Components\ComponentMarker.cs (1)
93=> Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.Testing (3)
Infrastructure\ServerFixture.cs (1)
164var readyToken = Guid.NewGuid().ToString("N");
Infrastructure\ServerInstance.cs (1)
36public string Id { get; } = Guid.NewGuid().ToString("N")[..8];
Infrastructure\TestLockClient.cs (1)
44var sessionId = Guid.NewGuid().ToString("N")[..8];
Microsoft.AspNetCore.Components.Web (1)
Forms\InputRadioGroup.cs (1)
15private readonly string _defaultGroupName = Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Components.WebAssembly (1)
src\aspnetcore\src\Shared\Components\ComponentMarker.cs (1)
93=> Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.Server.IntegrationTesting (1)
ApplicationPublisher.cs (1)
122var tempPath = Path.GetTempPath() + Guid.NewGuid().ToString("N");
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\aspnetcore\src\SignalR\common\testassets\Tests.Utils\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)
427private static string ToProjectGuidFormat(Guid id) => id.ToString("B").ToUpper();
Microsoft.Build.Tasks.Core (3)
ManifestUtil\FileReference.cs (3)
164_tlbid = tlbId.ToString("B"); 165_clsid = clsId.ToString("B"); 251_tlbid = tlbId.ToString("B");
Microsoft.CodeAnalysis (7)
Compilation.EmitStream.cs (1)
147tempFilePath = Path.Combine(tempDir, Guid.NewGuid().ToString("N"));
Compilation\DeterministicKeyBuilder.cs (1)
235internal static string GetGuidValue(in Guid guid) => guid.ToString("D");
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
87var 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\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.CodeStyle (2)
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
Microsoft.CodeAnalysis.CSharp (1)
Binder\Binder_Expressions.cs (1)
7222guidString = System.Guid.Empty.ToString("D");
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\DebuggingSessionTelemetry.cs (2)
82map["SolutionSessionId"] = data.SolutionSessionId.ToString("B").ToUpperInvariant(); 163=> 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)
84var assemblyName = Guid.NewGuid().ToString("N");
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
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\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
87var shadowDirectoryName = Guid.NewGuid().ToString("N").ToLowerInvariant();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
305m["ProjectGuid"] = projectState.ProjectInfo.Attributes.TelemetryId.ToString("B");
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\GetPkgDefAssemblyDependencyGuid.cs (1)
65item.SetMetadata(OutputMetadata, new Guid(reducedHash).ToString("B").ToUpperInvariant());
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\HotReloadClient\NamedPipeClientTransport.cs (1)
30_namedPipeName = Guid.NewGuid().ToString("N");
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (2)
447string toolMessageId = Guid.NewGuid().ToString("N"); 453string functionCallContentFallbackMessageId = Guid.NewGuid().ToString("N");
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\DataContentTests.cs (1)
628string relativeDir = "subdir_" + Guid.NewGuid().ToString("N");
Microsoft.Extensions.AI.Evaluation.Console (1)
Telemetry\DeviceIdHelper.cs (1)
44deviceId = Guid.NewGuid().ToString("D").ToLowerInvariant();
Microsoft.Extensions.AI.Tests (7)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (4)
969var messageId = Guid.NewGuid().ToString("N"); 1045var messageId = Guid.NewGuid().ToString("N"); 1257output.ForEach(m => m.MessageId = Guid.NewGuid().ToString("N")); 1339output.ForEach(m => m.MessageId = Guid.NewGuid().ToString("N"));
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
1187string messageId = Guid.NewGuid().ToString("N"); 2215MessageId = Guid.NewGuid().ToString("N") 2279MessageId = 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.NET.HostModel (3)
ComHost\ClsidMap.cs (1)
49string guidString = GetTypeGuid(metadataReader, definition).ToString("B");
ComHost\RegFreeComManifest.cs (2)
67XElement comClassElement = new XElement(ns + "comClass", new XAttribute("clsid", guid.ToString("B")), new XAttribute("threadingModel", "Both")); 91new XAttribute("tlbid", name.ToString("B")),
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (4)
Macros\GuidMacro.cs (3)
38string value = g.ToString(config.Format[i].ToString()); 57g.ToString(config.DefaultFormat).ToUpperInvariant() : 58g.ToString(config.DefaultFormat).ToLowerInvariant();
RunnableProjectConfig.cs (1)
412string newGuid = map.Key.ToString(format.ToString());
Microsoft.TestPlatform.CommunicationUtilities (1)
Json\Jsonite\Jsonite.cs (1)
1023{typeof (Guid), value => { WriteString(((Guid)value).ToString("D")); }},
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
198_attachmentGuid = Guid.NewGuid().ToString("N");
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (5)
ObjectModel\TestExecId.cs (1)
77string s = Id.ToString("B");
ObjectModel\TestId.cs (1)
230string s = Id.ToString("B");
ObjectModel\TestLink.cs (1)
85Id.ToString("B"),
ObjectModel\TestListCategoryId.cs (1)
99string s = Id.ToString("B");
ObjectModel\TestResult.cs (1)
100return ExecutionId.ToString("B");
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
DataCollector\Common\RequestId.cs (1)
78return Id.ToString("B");
DataCollector\Common\Session.cs (1)
35public override string ToString() => Id.ToString("B");
DataCollector\Common\TestExecId.cs (1)
36public override string ToString() => Id.ToString("B");
MSBuild (1)
XMake.cs (1)
2198restoreGlobalProperties[MSBuildConstants.MSBuildRestoreSessionId] = Guid.NewGuid().ToString("D");
MyFrontend (1)
Services\BasketServiceClient.cs (1)
47Id = Guid.NewGuid().ToString("N"),
Roslyn.Diagnostics.Analyzers (2)
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (2)
130name = symbolSpecification.ID.ToString("n"); 142name = namingStyle.ID.ToString("n");
rzc (1)
ShadowCopyManager.cs (1)
26var guid = Guid.NewGuid().ToString("N").ToLowerInvariant();
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)
310string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
System.IO.Packaging (2)
System\IO\Packaging\InternalRelationshipCollection.cs (1)
595return string.Concat("R", Guid.NewGuid().ToString("N").Substring(0, TimestampLength));
System\IO\Packaging\PartBasedPackageProperties.cs (1)
731+ Guid.NewGuid().ToString(GuidStorageFormatString)
System.Private.Windows.Core.TestUtilities (1)
FileCleanupTestBase.cs (1)
50private static string GetUniqueName() => Guid.NewGuid().ToString("D");
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (1)
749"netperm-" + Guid.NewGuid().ToString("B"),
VBCSCompiler (1)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (1)
322stagingDir = Path.Combine(dllCacheDir, hashKey + "." + Guid.NewGuid().ToString("N") + ".tmp");