56 writes to CurrentCulture
aspire (1)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (2)
Aspire.Hosting (2)
Aspire.Hosting.Tests (2)
Infrastructure.Common (2)
InteractiveHost32 (1)
InteractiveHost64 (1)
Microsoft.AspNetCore.Components.Tests (3)
Microsoft.AspNetCore.InternalTesting (6)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Localization.Tests (3)
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
Microsoft.AspNetCore.OpenApi.Tests (2)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.Test.Utilities (6)
Microsoft.Data.Analysis.Tests (1)
System.Private.CoreLib (2)
System.Private.Windows.Core.TestUtilities (2)
System.Text.Json.SourceGeneration (4)
Xunit.NetCore.Extensions (2)
1505 references to CurrentCulture
aspire (104)
Backchannel\ExtensionBackchannel.cs (8)
174throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidSocketPath, endpoint));
226string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli,
242string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli,
435throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
465throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
489throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
515throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
541throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
Commands\AddCommand.cs (6)
242InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, ExitCodeConstants.FailedToAddPackage, ExecutionContext.LogFilePath));
246InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version));
270var errorMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message);
318InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm));
371string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SelectAVersionOfPackage, firstPackage.Package.Id),
438string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SelectAVersionOfPackage, firstPackage.Package.Id),
Commands\ConfigCommand.cs (9)
113InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
184? string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeySetGlobally, key,
186: string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeySetLocally, key,
193var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message);
361InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
384InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedGlobally, key));
388InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedLocally, key));
395InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
401var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message);
Commands\ExecCommand.cs (5)
246InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath));
257InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath));
280var errorMessage = string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message);
287var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message);
295var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
Commands\RunCommand.cs (6)
249InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ProjectCouldNotBeBuilt, ExecutionContext.LogFilePath));
382var errorMessage = string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message);
389var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message);
393InteractionService.DisplayMessage(KnownEmojis.PageFacingUp, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeLogsAt, ExecutionContext.LogFilePath));
398var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
402InteractionService.DisplayMessage(KnownEmojis.PageFacingUp, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeLogsAt, ExecutionContext.LogFilePath));
Commands\WaitCommand.cs (7)
78_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.InvalidStatusValue, status));
93string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.SelectAppHost, WaitCommandStrings.SelectAppHostAction),
122string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.WaitingForResource, resourceName, statusLabel),
134_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceNotFound, resourceName));
140_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.WaitTimedOut, resourceName, statusLabel, timeoutSeconds));
145_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceEnteredFailedState, resourceName, response.State ?? response.ErrorMessage));
155_interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceReachedTargetStatus, resourceName, statusLabel, elapsed.TotalSeconds));
Interaction\ConsoleInteractionService.cs (5)
178throw new EmptyChoicesException(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.NoItemsAvailableForSelection, promptText));
207throw new EmptyChoicesException(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.NoItemsAvailableForSelection, promptText));
355_errorConsole.MarkupLine(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.NewCliVersionAvailable, newerVersion.EscapeMarkup()));
359_errorConsole.MarkupLine(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ToUpdateRunCommand, updateCommand.EscapeMarkup()));
362_errorConsole.MarkupLine(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.MoreInfoNewCliVersion, UpdateUrl));
Projects\ProjectLocator.cs (3)
103interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, relativePath));
150interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath));
328interactionService.DisplayMessage(KnownEmojis.FileCabinet, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.CreatedSettingsFile, $"[bold]'{relativeSettingsFilePath.EscapeMarkup()}'[/]"), allowMarkup: true);
Templating\DotNetTemplateFactory.cs (6)
382interactionService.DisplayMessage(KnownEmojis.CheckMark, string.Format(CultureInfo.CurrentCulture, TemplatingStrings.PromptForTFM_UsingForTesting, testFramework));
532interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, templateInstallResult.ExitCode, executionContext.LogFilePath));
536interactionService.DisplayMessage(KnownEmojis.Package, string.Format(CultureInfo.CurrentCulture, TemplatingStrings.UsingProjectTemplatesVersion, templateInstallResult.TemplateVersion));
571interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreationFailed, newProjectExitCode, executionContext.LogFilePath));
582interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreatedSuccessfully, outputPath));
593interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message));
Aspire.Dashboard (17)
Aspire.Dashboard.Components.Tests (5)
Aspire.Dashboard.Tests (17)
DurationFormatterTests.cs (16)
32Assert.Equal("1μs", DurationFormatter.FormatDuration(TimeSpan.FromTicks(1 * TimeSpan.TicksPerMicrosecond), CultureInfo.CurrentCulture));
39Assert.Equal("10d 14h", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
46Assert.Equal("2d", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
53Assert.Equal(2.36m.ToString("0.##ms", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
60Assert.Equal(2.36m.ToString("0.##s", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
67Assert.Equal("2m 31s", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
74Assert.Equal("2h 31m", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
81Assert.Equal(0.92m.ToString("0.##ms", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
88Assert.Equal(0.92m.ToString("0.##s", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
95Assert.Equal(0.1m.ToString("0.##μs", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks((long)input), CultureInfo.CurrentCulture));
102Assert.Equal("0μs", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input), CultureInfo.CurrentCulture));
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (12)
ApplicationModel\RequiredCommandValidator.cs (7)
103(not null, not null) => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandValidationFailedWithLink, command, validationMessage, link),
104(not null, null) => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandNotFoundWithLink, command, link),
105_ => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandNotFound, command)
112(not null, not null) => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandValidationFailed, command, validationMessage),
113(not null, null) => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandNotFound, command),
114_ => string.Format(CultureInfo.CurrentCulture, MessageStrings.RequiredCommandNotFound, command)
118_logger.LogWarning("{Message}", string.Format(CultureInfo.CurrentCulture, MessageStrings.ResourceMayFailToStart, resource.Name, message));
Aspire.Hosting.DevTunnels (10)
DevTunnelHealthCheck.cs (4)
31return HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_NoActiveHostConnections, _tunnelResource.TunnelId));
41return HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_PortInactive, _tunnelResource.TunnelId, portResource.TargetEndpoint.Port));
56return HealthCheckResult.Healthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelHealthy, _tunnelResource.TunnelId, tunnelStatus.HostConnections, tunnelStatus.Ports?.Count));
73return HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_Error, _tunnelResource.TunnelId, ex.Message), ex);
DevTunnelPortHealthCheck.cs (5)
22return Task.FromResult(HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelPortUnhealthy_StatusUnknown, _port, _tunnelResource.TunnelId)));
27return Task.FromResult(HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_NoActiveHostConnections, _tunnelResource.TunnelId)));
35return Task.FromResult(HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_PortInactive, _tunnelResource.TunnelId, _port)));
38return Task.FromResult(HealthCheckResult.Healthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelPortHealthy, _port, _tunnelResource.TunnelId)));
42return Task.FromResult(HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelPortUnhealthy_Error, _port, _tunnelResource.TunnelId, ex.Message), ex));
Aspire.Hosting.JavaScript.Tests (2)
Aspire.Hosting.Tests (4)
Aspire.Templates.Tests (2)
Aspire.TestUtilities (6)
BasicWebSite (1)
ClientSample (2)
CodeGenerator (1)
Crossgen2Tasks (1)
dotnet-dev-certs (2)
dotnet-getdocument (2)
dotnet-openapi (2)
dotnet-sql-cache (2)
dotnet-svcutil-lib (104)
CodeDomFixup\MethodCreationHelper.cs (5)
211throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingTypeNotSupportedFormat, binding.GetType().FullName));
1084throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingElementNotSupportedFormat, bindingElement.GetType().FullName));
1632throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrEncodingNotSupportedFormat, encoding.WebName));
1658throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrMessageVersionNotSupportedFormat, messageVersion));
1676throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrMessageVersionNotSupportedFormat, messagingVersion));
CommandProcessorOptions.cs (15)
353throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, workingDirectory));
358var moreThanOneProjectMsg = string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneProjectFoundFormat, workingDirectory);
362var useProjectOptions = string.Format(CultureInfo.CurrentCulture, SR.UseProjectFileOptionOnMultipleFilesMsgFormat, Switches.ProjectFile.Name, projectItems);
447throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileAlreadyExistsFormat, filePath, Switches.OutputFile.Name));
454string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileNotUnderOutputDirFormat, Switches.OutputFile.Name, outputFile, this.OutputDir, Switches.OutputDirectory.Name));
460this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnSpecifiedFilePathNotUndeProjectDirFormat, Switches.OutputFile.Name, outputFile, this.Project.DirectoryPath));
480throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, Directory.GetCurrentDirectory()));
484throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrProjectToUpdateNotFoundFormat, Switches.Update.Name, Switches.ProjectFile.Name));
515throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath));
523throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneUpdateParamsFilesFoundFormat, this.Project.FullPath, Switches.Update.Name, svcRefNames));
537throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrServiceReferenceNotFoundUnderProjectFormat, this.UpdateServiceReferenceFolder, this.Project.FullPath));
545throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath));
669throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidNamespaceFormat,
680this.Project.EndOfLifeTargetFrameworks?.ToList().ForEach(tfx => this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnOutOfSupportTargetFrameworkFormat, tfx)));
686this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnOutOfSupportTargetFrameworkFormat, this.TargetFramework.FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityTimestamp.cs (8)
165throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(string.Format(SRServiceModel.TimeStampHasCreationAheadOfExpiry, this.CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), this.ExpiryTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture))));
177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(string.Format(SRServiceModel.TimeStampHasExpiryTimeInPast, this.ExpiryTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), allowedClockSkew)));
183throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(string.Format(SRServiceModel.TimeStampHasCreationTimeInFuture, this.CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), allowedClockSkew)));
189throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(string.Format(SRServiceModel.TimeStampWasCreatedTooLongAgo, this.CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), timeToLive, allowedClockSkew)));
Shared\Options\OptionValueParser.cs (4)
238var invalidValueError = string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name);
239var supportedValues = string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOnInvalidEnumSupportedValuesFormat, string.Join(", ", Enum.GetNames(typeof(TValue))));
271throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name));
277throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name), innerException);
Shared\ProjectDependency.cs (11)
77throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath)));
82throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName)));
91throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageVersion, nameof(packageVersion)));
96throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencyType, nameof(dependencyType)));
104throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName)));
110throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName)));
120throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName)));
127throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath)));
140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath)));
180throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencySpec, nameof(dependencySpec)));
273throw new FormatException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorDepenencySpecFormat, dependencySpec));
dotnet-user-jwts (2)
dotnet-user-secrets (2)
GetDocument.Insider (2)
http2cat (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (1)
Infrastructure.Common (1)
LocalizationSample (9)
LocalizationWebsite (1)
Microsoft.Arcade.Common (2)
Microsoft.AspNetCore.Antiforgery (7)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Components (90)
BindConverter.cs (90)
37/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
53/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
77/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
101/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
109return value.ToString(culture ?? CultureInfo.CurrentCulture);
117/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
130return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
138/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
146return value.ToString(culture ?? CultureInfo.CurrentCulture);
154/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
167return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
175/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
183return value.ToString(culture ?? CultureInfo.CurrentCulture);
191/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
204return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
212/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
220return value.ToString(culture ?? CultureInfo.CurrentCulture);
228/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
241return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
249/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
257return value.ToString(culture ?? CultureInfo.CurrentCulture);
265/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
278return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
286/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
294return value.ToString(culture ?? CultureInfo.CurrentCulture);
302/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
315return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
323/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
335/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
345return value.ToString(format, culture ?? CultureInfo.CurrentCulture);
348return value.ToString(culture ?? CultureInfo.CurrentCulture);
353return value.ToString(culture ?? CultureInfo.CurrentCulture);
361/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
373/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
388return value.Value.ToString(format, culture ?? CultureInfo.CurrentCulture);
391return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
401return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
409/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
421/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
431return value.ToString(format, culture ?? CultureInfo.CurrentCulture);
434return value.ToString(culture ?? CultureInfo.CurrentCulture);
439return value.ToString(culture ?? CultureInfo.CurrentCulture);
447/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
459/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
474return value.Value.ToString(format, culture ?? CultureInfo.CurrentCulture);
477return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
487return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
495/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
507/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
518return value.ToDateTime(TimeOnly.MinValue).ToString(format, culture ?? CultureInfo.CurrentCulture);
521return value.ToString(culture ?? CultureInfo.CurrentCulture);
526return value.ToString(culture ?? CultureInfo.CurrentCulture);
534/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
546/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
562return value.Value.ToDateTime(TimeOnly.MinValue).ToString(format, culture ?? CultureInfo.CurrentCulture);
565return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
575return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
583/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
595/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
606return DateTime.MinValue.Add(value.ToTimeSpan()).ToString(format, culture ?? CultureInfo.CurrentCulture);
609return value.ToString(culture ?? CultureInfo.CurrentCulture);
614return value.ToString(culture ?? CultureInfo.CurrentCulture);
622/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
634/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
650return DateTime.MinValue.Add(value.Value.ToTimeSpan()).ToString(format, culture ?? CultureInfo.CurrentCulture);
653return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
663return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
681/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>.
789if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
808if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
854if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
873if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
919if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
938if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
984if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1009if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1061if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1086if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1138if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1157if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
1236if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1241else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1265if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1270else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1349if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1354else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1378if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1383else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1859return typeConverter.ConvertToString(context: null, culture ?? CultureInfo.CurrentCulture, value);
2079var converted = typeConverter.ConvertFrom(context: null, culture ?? CultureInfo.CurrentCulture, obj);
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (18)
BindConverterTest.cs (8)
162var expected = value.ToString(CultureInfo.CurrentCulture);
190var expected = value.ToString(CultureInfo.CurrentCulture);
218var expected = value.ToString(CultureInfo.CurrentCulture);
309var successfullyConverted = BindConverter.TryConvertTo<Guid>(incomingValue, CultureInfo.CurrentCulture, out var actual);
323var successfullyConverted = BindConverter.TryConvertTo<Guid>(incomingValue, CultureInfo.CurrentCulture, out var actual);
338var successfullyConverted = BindConverter.TryConvertTo<Guid?>(incomingValue, CultureInfo.CurrentCulture, out var actual);
351var successfullyConverted = BindConverter.TryConvertTo<Guid?>(incomingValue, CultureInfo.CurrentCulture, out var actual);
365var successfullyConverted = BindConverter.TryConvertTo<Guid?>(value, CultureInfo.CurrentCulture, out var actual);
Microsoft.AspNetCore.Components.Web (5)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.Cryptography.Internal (1)
Microsoft.AspNetCore.DataProtection (6)
Error.cs (6)
42var message = string.Format(CultureInfo.CurrentCulture, Resources.Common_PropertyCannotBeNullOrEmpty, propertyName);
48var message = string.Format(CultureInfo.CurrentCulture, Resources.Common_PropertyMustBeNonNegative, propertyName);
59var message = string.Format(CultureInfo.CurrentCulture, Resources.Common_KeyNotFound, id);
65var message = string.Format(CultureInfo.CurrentCulture, Resources.Common_KeyRevoked, id);
91var message = string.Format(CultureInfo.CurrentCulture, Resources.XmlKeyManager_DuplicateKey, keyId);
97var message = string.Format(CultureInfo.CurrentCulture, Resources.KeyRingProvider_DefaultKeyRevoked, id);
Microsoft.AspNetCore.DataProtection.Abstractions (7)
Microsoft.AspNetCore.HeaderPropagation (1)
Microsoft.AspNetCore.Hosting (4)
Microsoft.AspNetCore.Html.Abstractions (1)
Microsoft.AspNetCore.Html.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Connections (7)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
Microsoft.AspNetCore.InternalTesting (4)
Microsoft.AspNetCore.InternalTesting.Tests (3)
Microsoft.AspNetCore.Localization (4)
Microsoft.AspNetCore.Localization.Tests (3)
Microsoft.AspNetCore.Mvc.Core (6)
Microsoft.AspNetCore.Mvc.Core.Test (12)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
Microsoft.AspNetCore.Mvc.FunctionalTests (8)
AntiforgeryMiddlewareTest.cs (5)
47new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
88new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
131new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
163new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
195new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Shared.Tests (11)
Microsoft.AspNetCore.StaticFiles (3)
Microsoft.AspNetCore.WebUtilities (10)
Microsoft.AspNetCore.WebUtilities.Tests (1)
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
Microsoft.CodeAnalysis.Analyzers (3)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
SymbolDisplay\ObjectDisplayTests.cs (4)
288Assert.Equal("12,5", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture));
295Assert.Equal("12,5", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture));
302Assert.Equal("12,5", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture));
309Assert.Equal("12", ObjectDisplay.FormatLiteral(intValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.Features (8)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.Scripting (2)
Microsoft.CodeAnalysis.Test.Utilities (13)
Microsoft.CodeAnalysis.UnitTests (2)
MetadataReferences\FusionAssemblyIdentityTests.cs (2)
101RoundTrip(new AssemblyIdentity("goo", cultureName: CultureInfo.CurrentCulture.Name).ToAssemblyName());
107RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4), cultureName: CultureInfo.CurrentCulture.Name, publicKeyOrToken: new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }.AsImmutableOrNull()).ToAssemblyName());
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.Data.Analysis (4)
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
Microsoft.Extensions.AI.Evaluation.Reporting (7)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (9)
Storage\AzureStorageResponseCache.cs (6)
97CultureInfo.CurrentCulture,
118CultureInfo.CurrentCulture,
250? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath)
251: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath));
273? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath)
274: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Localization (1)
Microsoft.Extensions.Localization.Tests (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (2)
Microsoft.ML.AutoML.SourceGenerator (10)
Microsoft.ML.CodeGenerator (20)
Microsoft.VisualBasic.Core (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
PresentationBuildTasks (16)
PresentationCore (7)
PresentationCore.Tests (4)
System\Windows\Media\Animation\KeySplineConverter.Tests.cs (4)
276yield return new object[] { Brushes.Purple, typeof(string), CultureInfo.CurrentCulture };
295yield return new object[] { new KeySpline(0.1, 0.2, 0.3, 0.4), typeof(int), CultureInfo.CurrentCulture };
300yield return new object[] { new KeySpline(0.5, 0.5, 0.5, 0.5), typeof(Guid), CultureInfo.CurrentCulture };
306yield return new object[] { new KeySpline(0.1, 0.1, 0.9, 0.9), typeof(Color), CultureInfo.CurrentCulture };
PresentationFramework (37)
PresentationFramework.Tests (2)
PresentationUI (31)
ReachFramework (43)
PrintConfig\PrtTicket_Public_Simple.cs (5)
110return ((PageMediaSizeName != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", PageMediaSizeName) : "Null") + " (" +
111((Width != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Width) : "Null") +
113((Height != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Height) : "Null") +
218return ((X != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", X) : "Null") +
220((Y != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Y) : "Null") +
Swaggatherer (2)
System.Collections.NonGeneric (5)
System.ComponentModel.Annotations (12)
System.ComponentModel.Composition (10)
System.ComponentModel.TypeConverter (27)
System\ComponentModel\TypeConverter.cs (5)
49public object? ConvertFrom(object value) => ConvertFrom(null, CultureInfo.CurrentCulture, value);
89return ConvertFrom(context, CultureInfo.CurrentCulture, text);
124if (culture != null && culture != CultureInfo.CurrentCulture)
157return (string?)ConvertTo(null, CultureInfo.CurrentCulture, value, typeof(string));
165return (string?)ConvertTo(context, CultureInfo.CurrentCulture, value, typeof(string));
System.Configuration.ConfigurationManager (2)
System.Data.Common (19)
System.Data.Odbc (7)
System.Diagnostics.TextWriterTraceListener (1)
System.Drawing.Common (4)
System.Drawing.Common.Tests (1)
System.Drawing.Primitives (1)
System.Linq.Expressions (1)
System.Net.Requests (1)
System.Private.CoreLib (59)
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (10)
54return CultureInfo.CurrentCulture.CompareInfo.Compare(span, other, string.GetCaseCompareOfComparisonCulture(comparisonType)) == 0;
104return CultureInfo.CurrentCulture.CompareInfo.Compare(span, other, string.GetCaseCompareOfComparisonCulture(comparisonType));
140return CultureInfo.CurrentCulture.CompareInfo.IndexOf(span, value, string.GetCaseCompareOfComparisonCulture(comparisonType));
175return CultureInfo.CurrentCulture.CompareInfo.LastIndexOf(span, value, string.GetCaseCompareOfComparisonCulture(comparisonType));
194/// <remarks>If <paramref name="culture"/> is null, <see cref="CultureInfo.CurrentCulture"/> will be used.</remarks>
202culture ??= CultureInfo.CurrentCulture;
246/// <remarks>If <paramref name="culture"/> is null, <see cref="CultureInfo.CurrentCulture"/> will be used.</remarks>
254culture ??= CultureInfo.CurrentCulture;
306return CultureInfo.CurrentCulture.CompareInfo.IsSuffix(span, value, string.GetCaseCompareOfComparisonCulture(comparisonType));
344return CultureInfo.CurrentCulture.CompareInfo.IsPrefix(span, value, string.GetCaseCompareOfComparisonCulture(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (12)
148return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, GetCaseCompareOfComparisonCulture(comparisonType));
171CultureInfo compareCulture = culture ?? CultureInfo.CurrentCulture;
232return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, indexA, lengthA, strB, indexB, lengthB, options);
252CultureInfo compareCulture = culture ?? CultureInfo.CurrentCulture;
310return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, indexA, lengthA, strB, indexB, lengthB, GetCaseCompareOfComparisonCulture(comparisonType));
451return CultureInfo.CurrentCulture.CompareInfo.IsSuffix(this, value, GetCaseCompareOfComparisonCulture(comparisonType));
481CultureInfo referenceCulture = culture ?? CultureInfo.CurrentCulture;
597return CultureInfo.CurrentCulture.CompareInfo.Compare(this, value, GetCaseCompareOfComparisonCulture(comparisonType)) == 0;
655return CultureInfo.CurrentCulture.CompareInfo.Compare(a, b, GetCaseCompareOfComparisonCulture(comparisonType)) == 0;
720return CultureInfo.CurrentCulture.CompareInfo.GetHashCode(value, GetCaseCompareOfComparisonCulture(comparisonType));
1058return CultureInfo.CurrentCulture.CompareInfo.IsPrefix(this, value, GetCaseCompareOfComparisonCulture(comparisonType));
1097CultureInfo referenceCulture = culture ?? CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (5)
987var result = new DefaultInterpolatedStringHandler(0, 0, CultureInfo.CurrentCulture, stackalloc char[StackallocCharBufferSizeLimit]);
1195StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => ReplaceCore(oldValue, newValue, CultureInfo.CurrentCulture.CompareInfo, GetCaseCompareOfComparisonCulture(comparisonType)),
1212return ReplaceCore(this, oldValue.AsSpan(), newValue.AsSpan(), ci ?? CultureInfo.CurrentCulture.CompareInfo, options)
2357CultureInfo cult = culture ?? CultureInfo.CurrentCulture;
2372CultureInfo cult = culture ?? CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (4)
117StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)),
331StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)),
530StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.LastIndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)),
660StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.LastIndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)),
System.Private.Windows.Core.TestUtilities (9)
System.Private.Xml (5)
System.Runtime.Caching (1)
System.Security.Cryptography (2)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.Primitives (44)
System\ServiceModel\Security\SecurityTimestamp.cs (8)
159throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(SRP.Format(SRP.TimeStampHasCreationAheadOfExpiry, CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), ExpiryTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture))));
171throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(SRP.Format(SRP.TimeStampHasExpiryTimeInPast, ExpiryTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), allowedClockSkew)));
177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(SRP.Format(SRP.TimeStampHasCreationTimeInFuture, CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), allowedClockSkew)));
183throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(SRP.Format(SRP.TimeStampWasCreatedTooLongAgo, CreationTimeUtc.ToString(DefaultFormat, CultureInfo.CurrentCulture), now.ToString(DefaultFormat, CultureInfo.CurrentCulture), timeToLive, allowedClockSkew)));
System.ServiceModel.Primitives.Tests (1)
System.Text.Json.SourceGeneration (2)
System.Text.RegularExpressions (4)
System.Text.RegularExpressions.Generator (3)
System.Web.HttpUtility (1)
System.Windows.Controls.Ribbon (1)
System.Windows.Forms (99)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Design (30)
System.Windows.Forms.Design.Tests (4)
System.Windows.Forms.Primitives (3)
System.Windows.Forms.Tests (40)
System.Windows.Input.Manipulations (5)
System.Xaml (3)
System.Xaml.Tests (5)
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (3)
32yield return new object?[] { dateTimeOffset.ToString("O", CultureInfo.CurrentCulture), null, dateTimeOffset };
33yield return new object?[] { " " + dateTimeOffset.ToString("O", CultureInfo.CurrentCulture) + " ", null, dateTimeOffset };
80Assert.Equal(dateTimeOffset.ToString("O", culture ?? CultureInfo.CurrentCulture), converter.ConvertTo(null, culture, dateTimeOffset, typeof(string)));
TaskUsageLogger (9)
TaskUsageLogger.cs (9)
129throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Failed to load and read task registration information from project '{0}'. {1}", e.ProjectFile, ex.Message));
178throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why do we have two instances of {0}?", t));
195throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why is toolset '{0}' missing??", toolsVersion));
303throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "This logger doesn't know how to evaluate '{0}'!", unevaluatedString));
337throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why haven't we collected using task data for {0}?", projectFile));
350throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why don't we have a cached ToolsVersion for {0}?", projectFile));
356throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why haven't we collected default using task data for TV {0}?", parentProjectToolsVersion));
364throw new LoggerException(String.Format(CultureInfo.CurrentCulture, "Why couldn't we find a matching UsingTask for task {0} in project {1}?", taskName, projectFile));
437return String.Format(CultureInfo.CurrentCulture, "{0}, {1}, {2}, {3}, {4}, {5}", this.TaskName, this.TargetName, this.FilePath, this.ProjectPath, this.TaskAssembly, this.TaskId);
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
UIAutomationClientSideProviders (18)
MS\Internal\AutomationProxies\Accessible.cs (4)
1158Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected exception thrown for AccessibleChildren: {0}", e));
1166Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected hresult from AccessibleChildren: {0} count is {1} and actualCount is {2}", hr, count, actualCount));
1370Debug.Fail(string.Format(CultureInfo.CurrentCulture, "MsaaNativeProvider: IAccessible threw a COMException: {0}", e.Message));
1387Debug.Fail(string.Format(CultureInfo.CurrentCulture, "Unexpected IAccessible exception: {0}", e));
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
69return String.Format(System.Globalization.CultureInfo.CurrentCulture,"[{0}, {1}, {2}, {3}, {4}, {5}]", this.eM11, this.eM12, this.eM21, this.eM22, this.eDx, this.eDy );
Wasm.Performance.ConsoleHost (2)
WindowsFormsIntegration (12)
xunit.assert (173)
EqualityAsserts.cs (42)
351 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", expectedRounded, expected),
352 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", actualRounded, actual),
353 string.Format(CultureInfo.CurrentCulture, "Values are not within {0} decimal place{1}", precision, precision == 1 ? "" : "s")
377 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", expectedRounded, expected),
378 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", actualRounded, actual),
379 string.Format(CultureInfo.CurrentCulture, "Values are not within {0} decimal place{1}", precision, precision == 1 ? "" : "s")
400 expected.ToString("G17", CultureInfo.CurrentCulture),
401 actual.ToString("G17", CultureInfo.CurrentCulture),
402 string.Format(CultureInfo.CurrentCulture, "Values are not within tolerance {0:G17}", tolerance)
423 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", expectedRounded, expected),
424 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", actualRounded, actual),
425 string.Format(CultureInfo.CurrentCulture, "Values are not within {0} decimal place{1}", precision, precision == 1 ? "" : "s")
449 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", expectedRounded, expected),
450 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", actualRounded, actual),
451 string.Format(CultureInfo.CurrentCulture, "Values are not within {0} decimal place{1}", precision, precision == 1 ? "" : "s")
472 expected.ToString("G9", CultureInfo.CurrentCulture),
473 actual.ToString("G9", CultureInfo.CurrentCulture),
474 string.Format(CultureInfo.CurrentCulture, "Values are not within tolerance {0:G9}", tolerance)
495 string.Format(CultureInfo.CurrentCulture, "{0} (rounded from {1})", expectedRounded, expected),
496 string.Format(CultureInfo.CurrentCulture, "{0} (rounded from {1})", actualRounded, actual)
528 (precision == TimeSpan.Zero ? "" : string.Format(CultureInfo.CurrentCulture, " (difference {0} is larger than {1})", difference, precision));
562 (precision == TimeSpan.Zero ? "" : string.Format(CultureInfo.CurrentCulture, " (difference {0} is larger than {1})", difference, precision));
832 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", expectedRounded, expected),
833 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", actualRounded, actual),
834 string.Format(CultureInfo.CurrentCulture, "Values are within {0} decimal places", precision)
858 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", expectedRounded, expected),
859 string.Format(CultureInfo.CurrentCulture, "{0:G17} (rounded from {1:G17})", actualRounded, actual),
860 string.Format(CultureInfo.CurrentCulture, "Values are within {0} decimal places", precision)
881 expected.ToString("G17", CultureInfo.CurrentCulture),
882 actual.ToString("G17", CultureInfo.CurrentCulture),
883 string.Format(CultureInfo.CurrentCulture, "Values are within tolerance {0:G17}", tolerance)
904 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", expectedRounded, expected),
905 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", actualRounded, actual),
906 string.Format(CultureInfo.CurrentCulture, "Values are within {0} decimal places", precision)
930 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", expectedRounded, expected),
931 string.Format(CultureInfo.CurrentCulture, "{0:G9} (rounded from {1:G9})", actualRounded, actual),
932 string.Format(CultureInfo.CurrentCulture, "Values are within {0} decimal places", precision)
953 expected.ToString("G9", CultureInfo.CurrentCulture),
954 actual.ToString("G9", CultureInfo.CurrentCulture),
955 string.Format(CultureInfo.CurrentCulture, "Values are within tolerance {0:G9}", tolerance)
976 string.Format(CultureInfo.CurrentCulture, "{0} (rounded from {1})", expectedRounded, expected),
977 string.Format(CultureInfo.CurrentCulture, "{0} (rounded from {1})", actualRounded, actual)
Sdk\ArgumentFormatter.cs (27)
168 builder.AppendFormat(CultureInfo.CurrentCulture, @"\x{0}", (+ch).ToString("x2", CultureInfo.CurrentCulture));
178 builder.AppendFormat(CultureInfo.CurrentCulture, @"\x{0}", (+ch).ToString("x4", CultureInfo.CurrentCulture));
195 return string.Format(CultureInfo.CurrentCulture, "typeof({0})", FormatTypeName(value, fullTypeName: true));
218 return string.Format(CultureInfo.CurrentCulture, "typeof({0})", FormatTypeName(valueAsType, fullTypeName: true));
267 : string.Format(CultureInfo.CurrentCulture, "Task<{0}>", string.Join(",", typeParameters.Select(t => FormatTypeName(t))));
269 return string.Format(CultureInfo.CurrentCulture, "{0} {{ Status = {1} }}", typeName, task.Status);
293 return string.Format(CultureInfo.CurrentCulture, "{0} was thrown formatting an object of type \"{1}\"", ex.GetType().Name, value.GetType());
309 return string.Format(CultureInfo.CurrentCulture, "'{0}'", escapeSequence);
312 return string.Format(CultureInfo.CurrentCulture, "'{0}'", value);
315 return string.Format(CultureInfo.CurrentCulture, "0x{0:x4}", (int)value);
331 return string.Format(CultureInfo.CurrentCulture, "{0}{{ {1} }}", typeName, Ellipsis);
353 return string.Format(CultureInfo.CurrentCulture, "{0}{{ }}", typeName);
355 var formattedParameters = string.Join(", ", parameters.Take(MAX_OBJECT_ITEM_COUNT).Select(p => string.Format(CultureInfo.CurrentCulture, "{0} = {1}", p.name, p.value)));
360 return string.Format(CultureInfo.CurrentCulture, "{0}{{ {1} }}", typeName, formattedParameters);
364 string.Format(CultureInfo.CurrentCulture, "{0:o}", value);
367 string.Format(CultureInfo.CurrentCulture, "{0:G17}", value);
430 string.Format(CultureInfo.CurrentCulture, "{0:G9}", value);
443 return string.Format(CultureInfo.CurrentCulture, "\"{0}\"{1}", displayed, Ellipsis);
446 return string.Format(CultureInfo.CurrentCulture, "\"{0}\"", value);
494 arraySuffix += string.Format(CultureInfo.CurrentCulture, "[{0}]", new string(',', rank - 1));
526 result = string.Format(CultureInfo.CurrentCulture, "{0}<{1}>", result, new string(',', typeInfo.GenericTypeParameters.Length - 1));
532 result = string.Format(CultureInfo.CurrentCulture, "{0}<{1}>", result, string.Join(", ", typeInfo.GenericTypeArguments.Select(t => FormatTypeName(t))));
550 return string.Format(CultureInfo.CurrentCulture, "[{0}] = {1}", Format(k), Format(v));
553 return Convert.ToString(value, CultureInfo.CurrentCulture) ?? "null";
715 return string.Format(CultureInfo.CurrentCulture, "(throws {0})", UnwrapException(ex)?.GetType().Name);
Sdk\Exceptions\CollectionException.cs (3)
81 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
83 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}{2}Error: {3}", Environment.NewLine, formattedCollection, Environment.NewLine, FormatInnerException(exception));
101 CultureInfo.CurrentCulture,
Sdk\Exceptions\DoesNotContainException.cs (11)
50 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
52 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}", Environment.NewLine, collection);
77 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
79 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}{2}Found: {3}", Environment.NewLine, collection, Environment.NewLine, item);
95 CultureInfo.CurrentCulture,
115 CultureInfo.CurrentCulture,
144 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
146 message += string.Format(CultureInfo.CurrentCulture, "{0}Memory: {1}{2}Found: {3}", Environment.NewLine, memory, Environment.NewLine, expectedSubMemory);
171 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
173 message += string.Format(CultureInfo.CurrentCulture, "{0}Span: {1}{2}Found: {3}", Environment.NewLine, span, Environment.NewLine, expectedSubSpan);
198 CultureInfo.CurrentCulture,
Sdk\Exceptions\EqualException.cs (11)
117 ? string.Format(CultureInfo.CurrentCulture, "Assert.Equal() Failure: {0} differ", collectionDisplay ?? "Collections")
120 var expectedTypeText = expectedType != null && actualType != null && expectedType != actualType ? string.Format(CultureInfo.CurrentCulture, ", type {0}", expectedType) : "";
121 var actualTypeText = expectedType != null && actualType != null && expectedType != actualType ? string.Format(CultureInfo.CurrentCulture, ", type {0}", actualType) : "";
124 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2}{3})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex, expectedTypeText);
126 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: {1}{2}Actual: {3}", Environment.NewLine, expected, Environment.NewLine, actual);
129 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2}{3})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex, actualTypeText);
162 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2193 (pos {2})", newLineAndIndent, new string(' ', expectedPointer), expectedIndex);
164 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: {1}{2}Actual: {3}", Environment.NewLine, formattedExpected, Environment.NewLine, formattedActual);
167 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2191 (pos {2})", newLineAndIndent, new string(' ', actualPointer), actualIndex);
230 ? string.Format(CultureInfo.CurrentCulture, "Assert.Equal() Failure: {0}", banner ?? "Values differ")
235 CultureInfo.CurrentCulture,
Sdk\Exceptions\EquivalentException.cs (14)
45 CultureInfo.CurrentCulture,
47 string.Join(", ", memberNames.Select(k => string.Format(CultureInfo.CurrentCulture, "\"{0}{1}\"", prefix, k)))
58 CultureInfo.CurrentCulture,
75 CultureInfo.CurrentCulture,
100 CultureInfo.CurrentCulture,
124 CultureInfo.CurrentCulture,
159 CultureInfo.CurrentCulture,
161 Assert.GuardArgumentNotNull(nameof(memberName), memberName).Length == 0 ? string.Empty : string.Format(CultureInfo.CurrentCulture, ": Mismatched value on member '{0}'", memberName),
189 CultureInfo.CurrentCulture,
191 Assert.GuardArgumentNotNull(nameof(memberName), memberName).Length == 0 ? string.Empty : string.Format(CultureInfo.CurrentCulture, " in member '{0}'", memberName),
224 CultureInfo.CurrentCulture,
226 Assert.GuardArgumentNotNull(nameof(memberName), memberName).Length == 0 ? string.Empty : string.Format(CultureInfo.CurrentCulture, " in member '{0}'", memberName),
252 CultureInfo.CurrentCulture,
254 Assert.GuardArgumentNotNull(nameof(memberName), memberName).Length == 0 ? string.Empty : string.Format(CultureInfo.CurrentCulture, " in member '{0}'", memberName),
Sdk\Exceptions\NotEqualException.cs (6)
94 ? string.Format(CultureInfo.CurrentCulture, "Assert.NotEqual() Failure: {0} are equal", collectionDisplay ?? "Collections")
98 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex);
100 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: Not {1}{2}Actual: {3}", Environment.NewLine, expected, Environment.NewLine, actual);
103 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex);
152 ? string.Format(CultureInfo.CurrentCulture, "Assert.NotEqual() Failure: {0}", banner ?? "Values are equal")
157 CultureInfo.CurrentCulture,
Xunit.NetCore.Extensions (1)