46 writes to CurrentCulture
aspire (1)
Program.cs (1)
244CultureInfo.CurrentCulture = cultureInfo;
Aspire.Hosting.Tests (2)
Utils\StringComparersTests.cs (2)
29CultureInfo.CurrentCulture = new CultureInfo("en-AU"); 40CultureInfo.CurrentCulture = currentCulture;
Infrastructure.Common (2)
xunit\WcfCurrentCultureAttribute.cs (2)
26CultureInfo.CurrentCulture = _cultureInfo; 31CultureInfo.CurrentCulture = _savedCultureInfo;
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
31CultureInfo.CurrentCulture = culture;
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
31CultureInfo.CurrentCulture = culture;
Microsoft.AspNetCore.Components.Tests (3)
Rendering\RendererSynchronizationContextTest.cs (3)
111CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 272CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 380CultureInfo.CurrentCulture = new CultureInfo("en-GB");
Microsoft.AspNetCore.InternalTesting (6)
CultureReplacer.cs (2)
35CultureInfo.CurrentCulture = culture; 75CultureInfo.CurrentCulture = _originalCulture;
ReplaceCulture.cs (2)
59CultureInfo.CurrentCulture = Culture; 65CultureInfo.CurrentCulture = _originalCulture;
UseCultureAttribute.cs (2)
33CultureInfo.CurrentCulture = Culture; 39CultureInfo.CurrentCulture = _originalCulture;
Microsoft.AspNetCore.Localization (1)
RequestLocalizationMiddleware.cs (1)
125CultureInfo.CurrentCulture = requestCulture.Culture;
Microsoft.AspNetCore.Localization.Tests (3)
RequestLocalizationOptionsTest.cs (3)
37CultureInfo.CurrentCulture = explicitCulture; 74CultureInfo.CurrentCulture = explicitCulture; 129CultureInfo.CurrentCulture = _initialCulture;
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Infrastructure\CultureReplacerMiddleware.cs (2)
41CultureInfo.CurrentCulture = Culture; 48CultureInfo.CurrentCulture = _originalCulture;
Infrastructure\MvcTestFixture.cs (4)
51CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 57CultureInfo.CurrentCulture = originalCulture; 68CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 74CultureInfo.CurrentCulture = originalCulture;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonInputFormatterTest.cs (2)
497CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture); 521CultureInfo.CurrentCulture = originalCulture;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
LexicalAndXml\LexicalTests.cs (2)
3758CultureInfo.CurrentCulture = (CultureInfo)oldCulture.Clone(); 3770CultureInfo.CurrentCulture = oldCulture;
Syntax\SyntaxFactoryTests.cs (2)
371CultureInfo.CurrentCulture = new CultureInfo("de-DE", useUserOverride: false); 379CultureInfo.CurrentCulture = culture;
Microsoft.CodeAnalysis.Test.Utilities (6)
Assert\UseCultureAttribute.cs (2)
82CultureInfo.CurrentCulture = Culture; 95CultureInfo.CurrentCulture = _originalCulture;
CultureContext.cs (2)
20CultureInfo.CurrentCulture = cultureInfo; 25CultureInfo.CurrentCulture = _threadCulture;
FX\EnsureInvariantCulture.cs (2)
23CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; 32CultureInfo.CurrentCulture = _threadCulture;
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
Parser\VisualBasicParseOptionsTests.vb (3)
96CultureInfo.CurrentCulture = CultureInfo.InvariantCulture 99CultureInfo.CurrentCulture = New CultureInfo("cs-CZ", useUserOverride:=False) 103CultureInfo.CurrentCulture = currentCulture
Microsoft.Data.Analysis.Tests (1)
DataFrame.IOTests.cs (1)
134CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; // or en-US
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
119CultureInfo.CurrentCulture = _culture; 321CultureInfo.CurrentCulture = value;
System.Private.Windows.Core.TestUtilities (2)
ThreadCultureChange.cs (2)
31CultureInfo.CurrentCulture = newCulture; 43CultureInfo.CurrentCulture = _originalCulture;
1364 references to CurrentCulture
aspire (48)
Backchannel\AppHostBackchannel.cs (2)
149string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostIncompatibleWithCli, BaselineCapability), 160string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostIncompatibleWithCli, BaselineCapability),
Backchannel\ExtensionBackchannel.cs (6)
159throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidSocketPath, endpoint)); 211string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli, 227string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli, 424? throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)) 443return result ?? throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)); 463return result ?? throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
Certificates\CertificateService.cs (1)
57interactionService.DisplayMessage("warning", string.Format(CultureInfo.CurrentCulture, ErrorStrings.CertificatesMayNotBeFullyTrusted, trustExitCode));
Commands\AddCommand.cs (5)
154_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, addPackageResult)); 159_interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version)); 191_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message)); 229_interactionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm)); 270string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SelectAVersionOfPackage, selectedPackage.Package.Id),
Commands\ConfigCommand.cs (8)
89_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 149? string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeySetGlobally, key, 151: string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeySetLocally, key, 158_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message)); 243_interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedGlobally, key)); 247_interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedLocally, key)); 254_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 260_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message));
Commands\DeployCommand.cs (2)
29protected override string GetSuccessMessage(string fullyQualifiedOutputPath) => string.Format(CultureInfo.CurrentCulture, DeployCommandStrings.SuccessfullyDeployed, fullyQualifiedOutputPath); 31protected override string GetFailureMessage(int exitCode) => string.Format(CultureInfo.CurrentCulture, DeployCommandStrings.DeploymentFailed, exitCode);
Commands\ExecCommand.cs (3)
265_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message)); 270_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message)); 276_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
Commands\PublishCommand.cs (2)
51protected override string GetSuccessMessage(string fullyQualifiedOutputPath) => string.Format(CultureInfo.CurrentCulture, PublishCommandStrings.SuccessfullyPublishedArtifacts, fullyQualifiedOutputPath); 53protected override string GetFailureMessage(int exitCode) => string.Format(CultureInfo.CurrentCulture, PublishCommandStrings.FailedToPublishArtifacts, exitCode);
Commands\PublishCommandBase.cs (2)
221_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message)); 227_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
Commands\RootCommand.cs (1)
71$":bug: {string.Format(CultureInfo.CurrentCulture, RootCommandStrings.WaitingForDebugger, Environment.ProcessId)}",
Commands\RunCommand.cs (3)
277_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message.EscapeMarkup())); 282_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message.EscapeMarkup())); 288_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message.EscapeMarkup()));
Interaction\ConsoleInteractionService.cs (1)
73throw new EmptyChoicesException(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.NoItemsAvailableForSelection, promptText));
NuGet\NuGetPackageCache.cs (1)
84throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode));
Program.cs (2)
251errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.UnsupportedLocaleProvided, localeOverride, string.Join(", ", s_supportedLocales)); 256errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidLocaleProvided, localeOverride);
Projects\ProjectLocator.cs (2)
103interactionService.DisplayMessage("warning", string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath)); 187interactionService.DisplayMessage("file_cabinet", string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.CreatedSettingsFile, $"[bold]'{relativeSettingsFilePath}'[/]"));
Templating\DotNetTemplateFactory.cs (6)
150interactionService.DisplayMessage("check_mark", string.Format(CultureInfo.CurrentCulture, TemplatingStrings.PromptForTFM_UsingForTesting, testFramework)); 226interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, templateInstallResult.ExitCode)); 230interactionService.DisplayMessage($"package", string.Format(CultureInfo.CurrentCulture, TemplatingStrings.UsingProjectTemplatesVersion, templateInstallResult.TemplateVersion)); 257interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreationFailed, newProjectExitCode)); 263interactionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreatedSuccessfully, outputPath)); 274interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message));
Utils\AppHostHelper.cs (1)
41interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.AspireSDKVersionNotSupported, appHostInformation.AspireHostingVersion));
Aspire.Dashboard (15)
Components\Controls\Chart\ChartBase.cs (1)
203return $"<b>{HttpUtility.HtmlEncode(InstrumentViewModel.Instrument?.Name)}</b><br />{HttpUtility.HtmlEncode(name)}: {FormatHelpers.FormatNumberWithOptionalDecimalPlaces(yValue, maxDecimalPlaces: 6, CultureInfo.CurrentCulture)}<br />Time: {FormatHelpers.FormatTime(TimeProvider, TimeProvider.ToLocal(xValue))}";
Components\Controls\Chart\MetricTable.razor.cs (1)
317return value is null ? string.Empty : value.Value.ToString("F3", CultureInfo.CurrentCulture);
Components\Controls\Chart\PlotlyChart.razor.cs (1)
43var formattedValue = FormatHelpers.FormatNumberWithOptionalDecimalPlaces(yValue, maxDecimalPlaces: 3, CultureInfo.CurrentCulture);
Components\Dialogs\ExemplarsDialog.razor.cs (1)
68var formattedValue = value.Value.ToString("F3", CultureInfo.CurrentCulture);
Components\Pages\Metrics.razor.cs (1)
240CultureInfo.CurrentCulture,
Components\Pages\Resources.razor.cs (1)
702tooltipBuilder.Append(CultureInfo.CurrentCulture, $" + {displayedUrls.Count - maxShownUrls}");
Components\Pages\StructuredLogs.razor.cs (1)
404CultureInfo.CurrentCulture,
Components\Pages\Traces.razor.cs (1)
251CultureInfo.CurrentCulture,
Model\DefaultInstrumentUnitResolver.cs (1)
53value = value.ToLower(CultureInfo.CurrentCulture);
Model\ResourceViewModel.cs (1)
319value = FormatHelpers.FormatDateTime(_browserTimeProvider, date, cultureInfo: CultureInfo.CurrentCulture);
src\Shared\ConsoleLogs\LogPauseViewModel.cs (2)
30CultureInfo.CurrentCulture, 35CultureInfo.CurrentCulture,
Utils\FormatHelpers.cs (3)
76cultureInfo ??= CultureInfo.CurrentCulture; 91cultureInfo ??= CultureInfo.CurrentCulture; 134return value.ToString(formatString, provider ?? CultureInfo.CurrentCulture);
Aspire.Dashboard.Components.Tests (5)
UseCultureAttribute.cs (5)
11/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and 61/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> 74CultureInfo.CurrentCulture.ClearCachedData(); 79/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and 89CultureInfo.CurrentCulture.ClearCachedData();
Aspire.Dashboard.Tests (3)
DurationFormatterTests.cs (3)
50Assert.Equal(2.36m.ToString("0.##ms", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 57Assert.Equal(2.36m.ToString("0.##s", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 78Assert.Equal(0.1m.ToString("0.##μs", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks((long)input)));
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\TestOutputWrapper.cs (2)
28messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args))); 49messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
Aspire.Hosting.NodeJs.Tests (2)
NodeAppFixture.cs (2)
126messageSink.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args))); 136messageSink.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
Aspire.Hosting.Tests (1)
Utils\StringComparersTests.cs (1)
20var currentCulture = CultureInfo.CurrentCulture;
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\TestOutputWrapper.cs (2)
28messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args))); 49messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
Aspire.TestUtilities (6)
UseCultureAttribute.cs (5)
14/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and 58/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> 73CultureInfo.CurrentCulture.ClearCachedData(); 80/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and 96CultureInfo.CurrentCulture.ClearCachedData();
UseDefaultXunitCultureAttribute.cs (1)
10/// <see cref="CultureInfo.CurrentCulture" /> with another culture.
BasicWebSite (1)
Controllers\FiltersController.cs (1)
28return Content($"CurrentCulture:{CultureInfo.CurrentCulture.Name},CurrentUICulture:{CultureInfo.CurrentUICulture.Name}");
ClientSample (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
CodeGenerator (1)
HttpUtilities\HttpUtilities.cs (1)
251throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "MethodAsciiString {0} length is greather than {1}", method, length));
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\BuildErrorException.cs (1)
28: this(string.Format(CultureInfo.CurrentCulture, format, args))
dotnet-dev-certs (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
dotnet-getdocument (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
dotnet-openapi (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
dotnet-sql-cache (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
dotnet-svcutil-lib (104)
Bootstrapper\SvcutilBootstrapper.cs (1)
206throw new BootstrapException(string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", exception.Message, Environment.NewLine, Resource.BootstrapErrorDisableReferences));
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)
347throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, workingDirectory)); 352var moreThanOneProjectMsg = string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneProjectFoundFormat, workingDirectory); 356var useProjectOptions = string.Format(CultureInfo.CurrentCulture, SR.UseProjectFileOptionOnMultipleFilesMsgFormat, Switches.ProjectFile.Name, projectItems); 441throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileAlreadyExistsFormat, filePath, Switches.OutputFile.Name)); 448string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileNotUnderOutputDirFormat, Switches.OutputFile.Name, outputFile, this.OutputDir, Switches.OutputDirectory.Name)); 454this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnSpecifiedFilePathNotUndeProjectDirFormat, Switches.OutputFile.Name, outputFile, this.Project.DirectoryPath)); 474throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, Directory.GetCurrentDirectory())); 478throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrProjectToUpdateNotFoundFormat, Switches.Update.Name, Switches.ProjectFile.Name)); 509throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath)); 517throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneUpdateParamsFilesFoundFormat, this.Project.FullPath, Switches.Update.Name, svcRefNames)); 531throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrServiceReferenceNotFoundUnderProjectFormat, this.UpdateServiceReferenceFolder, this.Project.FullPath)); 539throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath)); 663throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidNamespaceFormat, 674this.Project.EndOfLifeTargetFrameworks?.ToList().ForEach(tfx => this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnOutOfSupportTargetFrameworkFormat, tfx))); 680this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnOutOfSupportTargetFrameworkFormat, this.TargetFramework.FullName));
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
2326Output.Write(d.ToString("F" + CultureInfo.CurrentCulture.NumberFormat.NumberDecimalDigits, CultureInfo.InvariantCulture));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifiers.cs (1)
14public CaseInsensitiveKeyComparer() : base(CultureInfo.CurrentCulture)
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CompiledXpathExpr.cs (1)
164_cinfo = CultureInfo.CurrentCulture; // System.Threading.Thread.CurrentThread.CurrentCulture;
FrameworkFork\System.ServiceModel\Framework\System\ComponentModel\InvalidEnumArgumentException.cs (1)
48invalidValue.ToString(CultureInfo.CurrentCulture),
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
161return String.Format(CultureInfo.CurrentCulture, "{0}/{1}", source.GetType().ToString(), source.GetHashCode());
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (4)
191using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture)) 247using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture)) 330using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture)) 359using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture))
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\Claim.cs (1)
201return string.Format(CultureInfo.CurrentCulture, "{0}: {1}", _right, _claimType);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingContext.cs (1)
128builder.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelRequirements.cs (2)
273contractChannelTypes.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator); 317bindingChannelTypes.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FaultConverter.cs (9)
97exception = new ProtocolException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 135exception = new ActionNotSupportedException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 140exception = new EndpointNotFoundException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 148exception = new MessageHeaderException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text, true); 156exception = new MessageHeaderException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 161exception = new ProtocolException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 169exception = new ProtocolException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 174exception = new ProtocolException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); 188exception = new ServerTooBusyException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (1)
113s_defaultMessageFault = MessageFault.CreateFault(new FaultCode("Default"), new FaultReason("", CultureInfo.CurrentCulture));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (3)
1040throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new ChannelTerminatedException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text)); 1049throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new SecurityAccessDeniedException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text)); 1074fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text));
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (1)
261return source.GetType().ToString() + "/" + source.GetHashCode().ToString(CultureInfo.CurrentCulture);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (1)
516endpointContractNames.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator);
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultException.cs (1)
217return reason.GetMatchingTranslation(System.Globalization.CultureInfo.CurrentCulture).Text;
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultReason.cs (1)
74return GetMatchingTranslation(CultureInfo.CurrentCulture);
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultReasonText.cs (1)
19_xmlLang = CultureInfo.CurrentCulture.Name;
FrameworkFork\System.ServiceModel\System\ServiceModel\MustUnderstandSoapException.cs (1)
34FaultReason reason = new FaultReason(string.Format(SRServiceModel.SFxHeaderNotUnderstood, name, ns), CultureInfo.CurrentCulture);
FrameworkFork\System.ServiceModel\System\ServiceModel\ProtocolException.cs (2)
23FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture); 47FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture);
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)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityContextSecurityToken.cs (1)
235return String.Format(CultureInfo.CurrentCulture, "SecurityContextSecurityToken(Identifier='{0}', KeyGeneration='{1}')", _contextId, _keyGeneration);
FrameworkFork\System.ServiceModel\System\ServiceModel\WSAddressing10ProblemHeaderQNameFault.cs (2)
38_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture); 48_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture);
ImportModule.cs (1)
171ToolConsole.WriteWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnCouldNotGenerateContractOperationsFormat, importer1, importer2));
Metadata\MetadataDocumentLoader.cs (3)
97throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 139throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 144throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrUrlNotAllowedOnMultipleInputsFormat, metadataUri));
Metadata\MetadataDocumentSaver.cs (2)
63DocumentSaveErrors = metadataDocumentSaver.UnresolvedReferences.Distinct().OrderBy(ur => ur.Uri).Select(ur => string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrUnableToResolveSchemaReferenceFormat, ur.Uri)) 74throw new IOException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrFileAlreadyExistsFormat, fileInfo.FilePath));
Metadata\MetadataFileNameManager.cs (3)
248throw new DirectoryNotFoundException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrDirectoryNotFoundFormat, dirInfo.FullName)); 255throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrDirectoryInsteadOfFileFormat, path)); 261throw new FileNotFoundException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrNoFilesFoundFormat, path));
Shared\MSBuildProj.cs (3)
329throw new Exception(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorProjectReferenceMissingFilePathFormat, binReference)); 393throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorFullPathNotAProjectFilePathFormat, fullPath)); 398throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorProjectFileAlreadyExistsFormat, fullPath));
Shared\Options\ApplicationOptions.cs (2)
75throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionAlreadyRegisteredFormat, option.Name)); 205throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.WarningUnrecognizedOptionFormat, optionId));
Shared\Options\ListValue.cs (1)
33throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionDuplicateValueFormat, this.Owner.Name, value));
Shared\Options\OptionBase.cs (2)
182throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionAlreadyDeserializedFormat, this.SerializationName)); 239var value = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", this.Name, this.Value?.ToString());
Shared\Options\OptionsSerializer.cs (3)
70var jOptionsObject = jPropInfo.Value as JObject ?? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, jPropInfo.Value?.Type, option.SerializationName)); 82options.AddWarning(string.Format(CultureInfo.CurrentCulture, Shared.Resources.WarningUnrecognizedOptionFormat, jPropInfo.Key)); 114options.AddWarning(string.Format(CultureInfo.CurrentCulture, Shared.Resources.WarningUnrecognizedOptionFormat, jProperty.Key));
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));
Shared\TargetFrameworkHelper.cs (1)
128throw new Exception(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorNotSupportedTargetFrameworkFormat,
ToolConsole.cs (2)
84errMsg = string.Format(CultureInfo.CurrentCulture, "{0} {1}", prefix, errMsg); 95message = string.Format(CultureInfo.CurrentCulture, "{0} {1}", SR.WarningPrefix, message);
dotnet-user-jwts (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
dotnet-user-secrets (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
GetDocument.Insider (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
http2cat (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IIS.FunctionalTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IIS.LongTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IIS.NewHandler.FunctionalTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IIS.NewShim.FunctionalTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IIS.ShadowCopy.Tests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
IISExpress.FunctionalTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
Infrastructure.Common (1)
xunit\WcfCurrentCultureAttribute.cs (1)
25_savedCultureInfo = CultureInfo.CurrentCulture;
LocalizationSample (9)
Startup.cs (9)
92await context.Response.WriteAsync($"<tr><th>{SR["Current thread culture:"]}</th><td>{CultureInfo.CurrentCulture.DisplayName} ({CultureInfo.CurrentCulture})</td></tr>"); 96await context.Response.WriteAsync($"<tr><th>{SR["Current date (request full):"]}</th><td>{DateTime.Now.ToString("F", CultureInfo.CurrentCulture)}</td></tr>"); 97await context.Response.WriteAsync($"<tr><th>{SR["Current date (request):"]}</th><td>{DateTime.Now.ToString(CultureInfo.CurrentCulture)}</td></tr>"); 99await context.Response.WriteAsync($"<tr><th>{SR["Current time (request):"]}</th><td>{DateTime.Now.ToString("T", CultureInfo.CurrentCulture)}</td></tr>"); 101await context.Response.WriteAsync($"<tr><th>{SR["Big number (request):"]}</th><td>{(Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>"); 103await context.Response.WriteAsync($"<tr><th>{SR["Big number negative (request):"]}</th><td>{(-Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>"); 105await context.Response.WriteAsync($"<tr><th>{SR["Money (request):"]}</th><td>{2199.50.ToString("C", CultureInfo.CurrentCulture)}</td></tr>"); 107await context.Response.WriteAsync($"<tr><th>{SR["Money negative (request):"]}</th><td>{(-2199.50).ToString("C", CultureInfo.CurrentCulture)}</td></tr>");
LocalizationWebsite (1)
StartupCustomCulturePreserved.cs (1)
34await context.Response.WriteAsync(10.ToString("C", CultureInfo.CurrentCulture));
Microsoft.Arcade.Common (2)
NupkgInfoFactory.cs (2)
43throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Did not extract nuspec file from package: {0}", path)); 47throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid package: {0}", path), ex);
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
115CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthOptions.cs (1)
36throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Exception_OptionMustBeProvided, nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Components (90)
BindConverter.cs (90)
36/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 52/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 76/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 100/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 108return value.ToString(culture ?? CultureInfo.CurrentCulture); 116/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 129return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 137/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 145return value.ToString(culture ?? CultureInfo.CurrentCulture); 153/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 166return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 174/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 182return value.ToString(culture ?? CultureInfo.CurrentCulture); 190/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 203return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 211/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 219return value.ToString(culture ?? CultureInfo.CurrentCulture); 227/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 240return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 248/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 256return value.ToString(culture ?? CultureInfo.CurrentCulture); 264/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 277return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 285/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 293return value.ToString(culture ?? CultureInfo.CurrentCulture); 301/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 314return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 322/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 334/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 344return value.ToString(format, culture ?? CultureInfo.CurrentCulture); 347return value.ToString(culture ?? CultureInfo.CurrentCulture); 352return value.ToString(culture ?? CultureInfo.CurrentCulture); 360/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 372/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 387return value.Value.ToString(format, culture ?? CultureInfo.CurrentCulture); 390return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 400return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 408/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 420/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 430return value.ToString(format, culture ?? CultureInfo.CurrentCulture); 433return value.ToString(culture ?? CultureInfo.CurrentCulture); 438return value.ToString(culture ?? CultureInfo.CurrentCulture); 446/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 458/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 473return value.Value.ToString(format, culture ?? CultureInfo.CurrentCulture); 476return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 486return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 494/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 506/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 517return value.ToDateTime(TimeOnly.MinValue).ToString(format, culture ?? CultureInfo.CurrentCulture); 520return value.ToString(culture ?? CultureInfo.CurrentCulture); 525return value.ToString(culture ?? CultureInfo.CurrentCulture); 533/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 545/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 561return value.Value.ToDateTime(TimeOnly.MinValue).ToString(format, culture ?? CultureInfo.CurrentCulture); 564return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 574return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 582/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 594/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 605return DateTime.MinValue.Add(value.ToTimeSpan()).ToString(format, culture ?? CultureInfo.CurrentCulture); 608return value.ToString(culture ?? CultureInfo.CurrentCulture); 613return value.ToString(culture ?? CultureInfo.CurrentCulture); 621/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 633/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 649return DateTime.MinValue.Add(value.Value.ToTimeSpan()).ToString(format, culture ?? CultureInfo.CurrentCulture); 652return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 662return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 680/// The <see cref="CultureInfo"/> to use while formatting. Defaults to <see cref="CultureInfo.CurrentCulture"/>. 788if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 807if (!int.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 853if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 872if (!long.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 918if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 937if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 983if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1008if (!float.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1060if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1085if (!double.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1137if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1156if (!decimal.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted)) 1235if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted)) 1240else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted)) 1264if (format != null && DateTime.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted)) 1269else if (format == null && DateTime.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted)) 1348if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted)) 1353else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted)) 1377if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted)) 1382else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted)) 1850return typeConverter.ConvertToString(context: null, culture ?? CultureInfo.CurrentCulture, value); 2062var converted = typeConverter.ConvertFrom(context: null, culture ?? CultureInfo.CurrentCulture, obj);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\RemoteRendererTest.cs (1)
675LocationHash = ssrComponentId.ToString(CultureInfo.CurrentCulture),
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);
EventCallbackFactoryBinderExtensionsTest.cs (4)
396await binder.InvokeAsync(new ChangeEventArgs() { Value = expectedValue.ToString(CultureInfo.CurrentCulture), }); 415await binder.InvokeAsync(new ChangeEventArgs() { Value = expectedValue.ToString(CultureInfo.CurrentCulture), }); 474await binder.InvokeAsync(new ChangeEventArgs() { Value = expectedValue.ToString(CultureInfo.CurrentCulture), }); 493await binder.InvokeAsync(new ChangeEventArgs() { Value = expectedValue.ToString(CultureInfo.CurrentCulture), });
Rendering\RendererSynchronizationContextTest.cs (6)
139capturedCulture = CultureInfo.CurrentCulture; 155Assert.Same(CultureInfo.CurrentCulture, capturedCulture); 282capturedCulture = CultureInfo.CurrentCulture; 289Assert.Same(CultureInfo.CurrentCulture, capturedCulture); 390capturedCulture = CultureInfo.CurrentCulture; 398Assert.Same(CultureInfo.CurrentCulture, capturedCulture);
Microsoft.AspNetCore.Components.Web (5)
BindInputElementAttribute.cs (2)
22/// Determines whether binding will use <see cref="CultureInfo.InvariantCulture" /> or <see cref="CultureInfo.CurrentCulture"/>. 62/// <see cref="CultureInfo.CurrentCulture"/>.
Forms\InputExtensions.cs (1)
35else if (BindConverter.TryConvertTo<TValue>(value, CultureInfo.CurrentCulture, out var parsedValue))
Forms\InputSelect.cs (1)
87CurrentValue = BindConverter.TryConvertTo<TValue>(value, CultureInfo.CurrentCulture, out var result)
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
73_messages.Add(fieldIdentifier, errorMessage.ToString(CultureInfo.CurrentCulture));
Microsoft.AspNetCore.Components.WebAssembly (3)
Hosting\WebAssemblyCultureProvider.cs (3)
34initialCulture: CultureInfo.CurrentCulture, 50((!CultureInfo.CurrentCulture.Name.Equals(InitialCulture.Name, StringComparison.Ordinal) || 65var culturesToLoad = GetCultures(CultureInfo.CurrentCulture);
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Hosting\WebAssemblyHostTest.cs (1)
100: base(CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture)
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
115CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Cryptography.Internal (1)
SafeHandles\BCryptAlgorithmHandle.cs (1)
144string message = String.Format(CultureInfo.CurrentCulture, Resources.BCryptAlgorithmHandle_ProviderNotFound, algorithmId);
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 (6)
src\Shared\WebEncoders\Properties\EncoderResources.cs (2)
27return string.Format(CultureInfo.CurrentCulture, WebEncoders_InvalidCountOffsetOrLength, p0, p1, p2); 35return string.Format(CultureInfo.CurrentCulture, WebEncoders_MalformedInput, p0);
src\Shared\WebEncoders\WebEncoders.cs (4)
161CultureInfo.CurrentCulture, 301CultureInfo.CurrentCulture, 460CultureInfo.CurrentCulture, 474CultureInfo.CurrentCulture,
Microsoft.AspNetCore.HeaderPropagation (1)
DependencyInjection\HeaderPropagationApplicationBuilderExtensions.cs (1)
17CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Hosting (4)
Internal\StartupLoader.cs (4)
244CultureInfo.CurrentCulture, 284CultureInfo.CurrentCulture, 344CultureInfo.CurrentCulture, 357CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Html.Abstractions (1)
HtmlFormattableString.cs (1)
49_formatProvider = formatProvider ?? CultureInfo.CurrentCulture;
Microsoft.AspNetCore.Html.Abstractions.Tests (2)
HtmlContentBuilderExtensionsTest.cs (1)
346builder.AppendFormat(CultureInfo.CurrentCulture, "{0:D}", new DateTime(2015, 02, 01));
HtmlFormattableStringTest.cs (1)
29var formattableString = new HtmlFormattableString(CultureInfo.CurrentCulture, "Hello, World!");
Microsoft.AspNetCore.Http.Connections (6)
src\Shared\WebEncoders\Properties\EncoderResources.cs (2)
27return string.Format(CultureInfo.CurrentCulture, WebEncoders_InvalidCountOffsetOrLength, p0, p1, p2); 35return string.Format(CultureInfo.CurrentCulture, WebEncoders_MalformedInput, p0);
src\Shared\WebEncoders\WebEncoders.cs (4)
161CultureInfo.CurrentCulture, 301CultureInfo.CurrentCulture, 460CultureInfo.CurrentCulture, 474CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Http.Extensions (1)
HeaderDictionaryTypeExtensions.cs (1)
320CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
UserStore.cs (1)
363throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.RoleNotFound, normalizedRoleName));
Microsoft.AspNetCore.InternalTesting (4)
CultureReplacer.cs (1)
32_originalCulture = CultureInfo.CurrentCulture;
ReplaceCulture.cs (2)
40/// The <see cref="CultureInfo.CurrentCulture"/> for the test. Defaults to en-GB. 56_originalCulture = CultureInfo.CurrentCulture;
UseCultureAttribute.cs (1)
31_originalCulture = CultureInfo.CurrentCulture;
Microsoft.AspNetCore.InternalTesting.Tests (3)
ReplaceCultureAttributeTest.cs (3)
45var originalCulture = CultureInfo.CurrentCulture; 55Assert.Equal(new CultureInfo(culture), CultureInfo.CurrentCulture); 62Assert.Equal(originalCulture, CultureInfo.CurrentCulture);
Microsoft.AspNetCore.Localization (4)
RequestLocalizationOptions.cs (4)
15new RequestCulture(CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture); 38/// Defaults to <see cref="CultureInfo.CurrentCulture"/> and <see cref="CultureInfo.CurrentUICulture"/>. 95/// Defaults to <see cref="CultureInfo.CurrentCulture"/>. 97public IList<CultureInfo>? SupportedCultures { get; set; } = new List<CultureInfo> { CultureInfo.CurrentCulture };
Microsoft.AspNetCore.Localization.Tests (3)
RequestLocalizationOptionsTest.cs (3)
16_initialCulture = CultureInfo.CurrentCulture; 28Assert.Equal(CultureInfo.CurrentCulture, options.DefaultRequestCulture.Culture); 65Assert.Collection(options.SupportedCultures, item => Assert.Equal(CultureInfo.CurrentCulture, item));
Microsoft.AspNetCore.Mvc.Core (6)
Formatters\FormatterMappings.cs (2)
88string.Format(CultureInfo.CurrentCulture, Resources.FormatterMappings_NotValidMediaType, contentType), 101throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Format_NotValid, format), nameof(format));
ModelBinding\FormValueProviderFactory.cs (1)
57CultureInfo.CurrentCulture);
ModelBinding\JQueryFormValueProviderFactory.cs (1)
57CultureInfo.CurrentCulture);
Routing\ConventionalRouteEntry.cs (1)
45CultureInfo.CurrentCulture,
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
115CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Mvc.Core.Test (12)
ConsumesAttributeTests.cs (1)
70CultureInfo.CurrentCulture,
Infrastructure\ObjectResultExecutorTest.cs (1)
354CultureInfo.CurrentCulture,
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
542CultureInfo.CurrentCulture, 584CultureInfo.CurrentCulture,
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
523result.Id = int.Parse(tokens[1], CultureInfo.CurrentCulture);
ModelBinding\DefaultModelBindingContextTest.cs (1)
180CultureInfo.CurrentCulture));
ModelBinding\FormValueProviderFactoryTest.cs (1)
45Assert.Equal(CultureInfo.CurrentCulture, valueProvider.Culture);
ModelBinding\JQueryFormValueProviderFactoryTest.cs (2)
69Assert.Equal(CultureInfo.CurrentCulture, valueProvider.Culture); 130Assert.Equal(CultureInfo.CurrentCulture, jqueryFormValueProvider.Culture);
ModelBinding\JQueryFormValueProviderTest.cs (1)
24var provider = new JQueryFormValueProvider(BindingSource.Form, dictionary, CultureInfo.CurrentCulture);
ModelBinding\JQueryQueryStringValueProviderTest.cs (1)
27CultureInfo.CurrentCulture);
ModelBinding\ModelBindingHelperTest.cs (1)
359CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
CompareAttributeAdapter.cs (1)
72return string.Format(CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
DataAnnotationsMetadataProviderTest.cs (4)
564.Returns(() => new LocalizedString("Model_Name", "name from localizer " + CultureInfo.CurrentCulture)); 567.Returns(() => new LocalizedString("Model_Description", "description from localizer " + CultureInfo.CurrentCulture)); 570.Returns(() => new LocalizedString("Model_Prompt", "prompt from localizer " + CultureInfo.CurrentCulture)); 1713return new LocalizedString(k, $"{k} {CultureInfo.CurrentCulture}");
FileExtensionsAttributeAdapterTest.cs (2)
30var expectedErrorMessage = string.Format(CultureInfo.CurrentCulture, attribute.ErrorMessage, nameof(Profile.PhotoFileName), formattedExtensions); 81var expectedErrorMessage = string.Format(CultureInfo.CurrentCulture, attribute.ErrorMessage, nameof(Profile.PhotoFileName), formattedExtensions);
TestResources.cs (1)
13public static string Type_Three_Name => "type three name " + CultureInfo.CurrentCulture;
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)),
Infrastructure\CultureReplacerMiddleware.cs (1)
38_originalCulture = CultureInfo.CurrentCulture;
Infrastructure\MvcTestFixture.cs (2)
47var originalCulture = CultureInfo.CurrentCulture; 64var originalCulture = CultureInfo.CurrentCulture;
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
ActionParametersIntegrationTest.cs (6)
407CultureInfo.CurrentCulture, 474CultureInfo.CurrentCulture, 498CultureInfo.CurrentCulture, 521CultureInfo.CurrentCulture, 560CultureInfo.CurrentCulture, 593CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
MvcNewtonsoftJsonOptions.cs (1)
52/// Gets or sets a flag to determine whether the value of <see cref="CultureInfo.CurrentCulture"/>
NewtonsoftJsonInputFormatter.cs (1)
156jsonSerializer.Culture = CultureInfo.CurrentCulture;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
NewtonsoftJsonInputFormatterTest.cs (1)
496var originalCulture = CultureInfo.CurrentCulture;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (4)
CompilationFailedExceptionFactory.cs (3)
121diagnostic.GetMessage(CultureInfo.CurrentCulture), 122CSharpDiagnosticFormatter.Instance.Format(diagnostic, CultureInfo.CurrentCulture), 135var message = razorDiagnostic.GetMessage(CultureInfo.CurrentCulture);
PageDirectiveFeature.cs (1)
127messages[i] = diagnostics[i].GetMessage(CultureInfo.CurrentCulture);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
CompilerFailedExceptionFactoryTest.cs (4)
184Assert.Equal(diagnostics[0].GetMessage(CultureInfo.CurrentCulture), message.Message); 193Assert.Equal(diagnostics[1].GetMessage(CultureInfo.CurrentCulture), message.Message); 202Assert.Equal(diagnostics[2].GetMessage(CultureInfo.CurrentCulture), message.Message); 217Assert.Equal(diagnostics[3].GetMessage(CultureInfo.CurrentCulture), message.Message);
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Cache\CacheTagKey.cs (1)
105_requestCulture = CultureInfo.CurrentCulture;
CacheTagHelperBase.cs (1)
100/// Setting this to <c>true</c> would result in the result to be varied by <see cref="CultureInfo.CurrentCulture" />
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
DefaultDisplayTemplates.cs (1)
153string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.Model);
DefaultEditorTemplates.cs (1)
135string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.Model);
DefaultHtmlGenerator.cs (7)
116return ViewDataDictionary.FormatValue(value, format, CultureInfo.CurrentCulture); 444var valueString = Convert.ToString(value, CultureInfo.CurrentCulture); 460var valueString = Convert.ToString(value, CultureInfo.CurrentCulture); 975var stringValue = (value as string) ?? Convert.ToString(value, CultureInfo.CurrentCulture); 1030return Convert.ToString(viewContext.ViewData.Eval(key, format), CultureInfo.CurrentCulture); 1192culture = CultureInfo.CurrentCulture; 1415return Convert.ToString(viewContext.ViewData.Eval(key), CultureInfo.CurrentCulture);
ExpressionMetadataProvider.cs (1)
204var model = viewData.Model == null ? null : Convert.ToString(viewData.Model, CultureInfo.CurrentCulture);
ModelExplorerExtensions.cs (2)
64var stringResult = Convert.ToString(modelExplorer.Model, CultureInfo.CurrentCulture); 87return Convert.ToString(firstProperty.Model, CultureInfo.CurrentCulture);
RemoteAttributeBase.cs (1)
119return string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name);
Rendering\FormInputRenderMode.cs (1)
22/// Always use <see cref="CultureInfo.CurrentCulture"/> to format input element values.
Rendering\MultiSelectList.cs (2)
155var stringValue = Convert.ToString(value, CultureInfo.CurrentCulture); 211return Convert.ToString(value, CultureInfo.CurrentCulture);
TemplateBuilder.cs (1)
94formattedModelValue = string.Format(CultureInfo.CurrentCulture, formatString, _model);
ViewDataDictionary.cs (2)
384return FormatValue(value, format, CultureInfo.CurrentCulture); 396=> FormatValue(value, format, CultureInfo.CurrentCulture);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Rendering\HtmlHelperSelectTest.cs (1)
1306.Returns<string>((s) => { return new LocalizedString(s, s + " " + CultureInfo.CurrentCulture); });
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
97: CultureInfo.CurrentCulture;
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (1)
208CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\Response.cs (1)
78throw new ArgumentOutOfRangeException(nameof(value), value, string.Format(CultureInfo.CurrentCulture, Resources.Exception_InvalidStatusCode, value));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex]));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex]));
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\ApplicationDeployerFactory.cs (1)
38CultureInfo.CurrentCulture,
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
Microsoft.AspNetCore.Shared.Tests (10)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex]));
src\Shared\runtime\SR.cs (1)
16return string.Format(CultureInfo.CurrentCulture, resourceFormat, args);
src\Shared\WebEncoders\Properties\EncoderResources.cs (2)
27return string.Format(CultureInfo.CurrentCulture, WebEncoders_InvalidCountOffsetOrLength, p0, p1, p2); 35return string.Format(CultureInfo.CurrentCulture, WebEncoders_MalformedInput, p0);
src\Shared\WebEncoders\WebEncoders.cs (4)
161CultureInfo.CurrentCulture, 301CultureInfo.CurrentCulture, 460CultureInfo.CurrentCulture, 474CultureInfo.CurrentCulture,
Microsoft.AspNetCore.StaticFiles (3)
HtmlDirectoryFormatter.cs (3)
145HtmlEncode(subdir.LastModified.ToString(CultureInfo.CurrentCulture))); 181HtmlEncode(file.Length.ToString("n0", CultureInfo.CurrentCulture)), 182HtmlEncode(file.LastModified.ToString(CultureInfo.CurrentCulture)));
Microsoft.AspNetCore.WebUtilities (9)
FormPipeReader.cs (3)
320CultureInfo.CurrentCulture, 330CultureInfo.CurrentCulture, 339CultureInfo.CurrentCulture,
src\Shared\WebEncoders\Properties\EncoderResources.cs (2)
27return string.Format(CultureInfo.CurrentCulture, WebEncoders_InvalidCountOffsetOrLength, p0, p1, p2); 35return string.Format(CultureInfo.CurrentCulture, WebEncoders_MalformedInput, p0);
src\Shared\WebEncoders\WebEncoders.cs (4)
161CultureInfo.CurrentCulture, 301CultureInfo.CurrentCulture, 460CultureInfo.CurrentCulture, 474CultureInfo.CurrentCulture,
Microsoft.AspNetCore.WebUtilities.Tests (1)
FormPipeReaderTests.cs (1)
231CultureInfo.CurrentCulture,
Microsoft.Build.Framework (2)
LazyFormattedBuildEventArgs.cs (1)
125argValue = Convert.ToString(argument, CultureInfo.CurrentCulture) ?? "";
Traits.cs (1)
604formatted = String.Format(CultureInfo.CurrentCulture, unformatted, args);
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
142return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args), e); 148return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args));
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
142return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args), e); 148return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args));
Microsoft.CodeAnalysis.Analyzers (3)
MetaAnalyzers\Fixers\ApplyDiagnosticAnalyzerAttributeFix.cs (3)
39var title = string.Format(CultureInfo.CurrentCulture, CodeAnalysisDiagnosticsResources.ApplyDiagnosticAnalyzerAttribute_1, LanguageNames.CSharp); 43title = string.Format(CultureInfo.CurrentCulture, CodeAnalysisDiagnosticsResources.ApplyDiagnosticAnalyzerAttribute_1, LanguageNames.VisualBasic); 47title = string.Format(CultureInfo.CurrentCulture, CodeAnalysisDiagnosticsResources.ApplyDiagnosticAnalyzerAttribute_2, LanguageNames.CSharp, LanguageNames.VisualBasic);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
LocalizationInfraTests.cs (6)
39var uiCulture = CultureInfo.CurrentUICulture.Name == CultureInfo.CurrentCulture.Name 41: CultureInfo.CurrentCulture; 43{CultureInfo.CurrentCulture} 44{CultureInfo.CurrentCulture} 45{((double)2.1).ToString(CultureInfo.CurrentCulture)} 46{((decimal)2.1).ToString(CultureInfo.CurrentCulture)}
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EnableNullable\EnableNullableTests.cs (1)
666if (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "en")
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)
LexicalAndXml\LexicalTests.cs (3)
3755var oldCulture = CultureInfo.CurrentCulture; 3759CultureInfo.CurrentCulture.NumberFormat.NegativeSign = "~"; 3760CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator = ",";
Syntax\SyntaxFactoryTests.cs (1)
370var culture = CultureInfo.CurrentCulture;
Microsoft.CodeAnalysis.EditorFeatures (3)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
606return patternMatchers.GetHighlightedSpans(matchResult.CompletionItem.GetEntireDisplayText(), CultureInfo.CurrentCulture)
Interactive\InteractiveSession.cs (2)
381CultureInfo.CurrentCulture, 390gacFileResolver: platformInfo.HasGlobalAssemblyCache ? new GacFileResolver(preferredCulture: CultureInfo.CurrentCulture) : null,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (15)
IntelliSense\CSharpCompletionCommandHandlerTests_DateAndTime.vb (11)
360If CultureInfo.CurrentCulture.Name <> "en-US" Then 362Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text) 390If CultureInfo.CurrentCulture.Name <> "en-US" Then 392Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text) 552If CultureInfo.CurrentCulture.Name <> "en-US" Then 554Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text) 582If CultureInfo.CurrentCulture.Name <> "en-US" Then 584Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text) 650If CultureInfo.CurrentCulture.Name <> "en-US" Then 652Assert.Contains($"MMMM ({CultureInfo.CurrentCulture.Name}) → {CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(6)}", text)
IntelliSense\VisualBasicCompletionCommandHandlerTests_DateAndTime.vb (4)
149If CultureInfo.CurrentCulture.Name <> "en-US" Then 151Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text) 233If CultureInfo.CurrentCulture.Name <> "en-US" Then 235Assert.Contains($"hh:mm:ss ({CultureInfo.CurrentCulture.Name}) → 01:45:30", text)
Microsoft.CodeAnalysis.Features (8)
CodeLens\CodeLensReferencesService.cs (1)
115throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Unsupported language '{0}'", semanticModel.Language), nameof(semanticModel));
Completion\CompletionService.cs (2)
290items.Select(item => helper.GetMatchResult(item, includeMatchSpans: false, CultureInfo.CurrentCulture))); 318builder.AddRange(filteredItems.Select(item => completionPatternMatchers.GetMatchResult(item, includeMatchSpans: false, CultureInfo.CurrentCulture)));
Completion\PatternMatchHelper.cs (2)
151? GetMatch(item.FilterText, includeMatchSpans, CultureInfo.CurrentCulture) 167var additionalMatch = GetMatch(additionalFilterText, includeMatchSpans, CultureInfo.CurrentCulture);
EmbeddedLanguages\DateAndTime\EmbeddedCompletionContext.cs (1)
77var primaryCulture = CultureInfo.CurrentCulture;
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionServiceWithProviders.cs (1)
47builder.AddRange(filteredItems.Select(item => helper.GetMatchResult(item, includeMatchSpans: false, CultureInfo.CurrentCulture)));
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
237GlobalAssemblyCache.Instance.ResolvePartialName(fullAssemblyName, out assemblyLocation, preferredCulture: CultureInfo.CurrentCulture);
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
130gacFileResolver: s_currentPlatformInfo.HasGlobalAssemblyCache ? new GacFileResolver(preferredCulture: CultureInfo.CurrentCulture) : null,
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (2)
193if (string.Equals(_code[currentCharIndex].ToString(CultureInfo.CurrentCulture), _delimiter, StringComparison.Ordinal)) 214if (string.Equals(_code[currentCharIndex].ToString(CultureInfo.CurrentCulture), _delimiter, StringComparison.Ordinal))
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
DeclarePublicApiAnalyzer.Impl.cs (2)
476return string.Format(CultureInfo.CurrentCulture, formatString, property.Name); 480string.Format(CultureInfo.CurrentCulture, PublicApiAnalyzerResources.ImplicitConstructorErrorMessageName, symbol.ContainingSymbol.ToDisplayString(ShortSymbolNameFormat)) :
Microsoft.CodeAnalysis.Scripting (2)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
60gacFileResolver: GacFileResolver.IsAvailable ? new GacFileResolver(preferredCulture: CultureInfo.CurrentCulture) : null,
ScriptBuilder.cs (1)
115formatter.Format(filtered[0], CultureInfo.CurrentCulture),
Microsoft.CodeAnalysis.Test.Utilities (13)
Assert\ConditionalFactAttribute.cs (2)
244if (string.IsNullOrEmpty(CultureInfo.CurrentCulture.Name)) 251!CultureInfo.CurrentCulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase);
Assert\UseCultureAttribute.cs (6)
17/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and 73/// Stores the current <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> 79_originalCulture = CultureInfo.CurrentCulture; 84CultureInfo.CurrentCulture.ClearCachedData(); 89/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and 97CultureInfo.CurrentCulture.ClearCachedData();
CultureContext.cs (1)
19_threadCulture = CultureInfo.CurrentCulture;
Diagnostics\DiagnosticExtensions.cs (1)
446=> e.Location.IsInSource ? $"{e.Severity} {e.Id}: {e.GetMessage(CultureInfo.CurrentCulture)}" :
FX\EnsureInvariantCulture.cs (1)
21_threadCulture = CultureInfo.CurrentCulture;
TestBase.cs (2)
41if (CultureInfo.CurrentUICulture != CultureInfo.CurrentCulture) 44CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture;
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.VisualBasic.Features (4)
CodeLens\VisualBasicDisplayInfoService.vb (4)
73symbolName = String.Format(CultureInfo.CurrentCulture, VBFeaturesResources.Property_getter_name, symbolNameWithNoParams) 77symbolName = String.Format(CultureInfo.CurrentCulture, VBFeaturesResources.Property_setter_name, symbolNameWithNoParams) 87symbolName = String.Format(CultureInfo.CurrentCulture, VBFeaturesResources.Event_add_handler_name, symbolNameWithNoParams) 91symbolName = String.Format(CultureInfo.CurrentCulture, VBFeaturesResources.Event_remove_handler_name, symbolNameWithNoParams)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\VisualBasicParseOptionsTests.vb (1)
94Dim currentCulture = CultureInfo.CurrentCulture
Microsoft.CodeAnalysis.Workspaces (1)
PatternMatching\PatternMatcher.cs (1)
54culture ??= CultureInfo.CurrentCulture;
Microsoft.Data.Analysis (4)
DataFrame.cs (2)
532cultureInfo = CultureInfo.CurrentCulture; 615cultureInfo = CultureInfo.CurrentCulture;
DataFrame.IO.cs (2)
364cultureInfo = CultureInfo.CurrentCulture; 658cultureInfo = CultureInfo.CurrentCulture;
Microsoft.DotNet.Build.Tasks.TargetFramework (2)
ChooseBestP2PTargetFrameworkTask.cs (2)
56string errorMessage = string.Format(CultureInfo.CurrentCulture, "The project target framework '{0}' is not a supported target framework.", $"TargetFrameworkMoniker: {CurrentProjectTargetFramework}, TargetPlatformMoniker:{CurrentProjectTargetPlatform}"); 107Log.LogError(string.Format(CultureInfo.CurrentCulture, "Project '{0}' targets '{1}'. It cannot be referenced by a project that targets '{2}{3}'.", project.ItemSpec, referencedProjectFrameworkString, projectNuGetFramework.DotNetFrameworkName, projectNuGetFramework.HasPlatform ? "-" + projectNuGetFramework.DotNetPlatformName : string.Empty));
Microsoft.Extensions.AI.Evaluation.Reporting (7)
Storage\DiskBasedResponseCache.CacheEntry.cs (2)
45string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheEntryFilePath)); 62string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheEntryFilePath));
Storage\DiskBasedResponseCache.cs (4)
149CultureInfo.CurrentCulture, 167CultureInfo.CurrentCulture, 312? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 313: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath));
Storage\DiskBasedResultStore.cs (1)
76string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, resultFile.FullName))
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (9)
Storage\AzureStorageResponseCache.CacheEntry.cs (2)
50string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, fileClient.Name)); 68string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, fileClient.Name));
Storage\AzureStorageResponseCache.cs (6)
102CultureInfo.CurrentCulture, 123CultureInfo.CurrentCulture, 255? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 256: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath)); 278? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 279: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath));
Storage\AzureStorageResultStore.cs (1)
120string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, fileClient.Name));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Linux\LinuxUtilizationParserCgroupV2.cs (2)
652string quotaString = quota.ToString(CultureInfo.CurrentCulture); 719string quotaString = quota.ToString(CultureInfo.CurrentCulture);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Linux\LinuxUtilizationParserCgroupV1Tests.cs (1)
131{ new FileInfo("/sys/fs/cgroup/memory/memory.usage_in_bytes"), total.ToString(CultureInfo.CurrentCulture) }
Linux\LinuxUtilizationParserCgroupV2Tests.cs (1)
207{ new FileInfo("/sys/fs/cgroup/memory.current"), total.ToString(CultureInfo.CurrentCulture) }
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizer.cs (1)
119var value = string.Format(CultureInfo.CurrentCulture, format ?? name, arguments);
Microsoft.Extensions.Localization.Tests (1)
ResourceManagerStringLocalizerTest.cs (1)
203string cultureName = CultureInfo.CurrentCulture.ToString();
Microsoft.Maui (1)
Platform\TimeExtensions.cs (1)
19 cultureInfo ??= CultureInfo.CurrentCulture;
Microsoft.Maui.Controls (2)
BindingExpressionHelper.cs (2)
34 if (stringValue.EndsWith(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, StringComparison.Ordinal) && DecimalTypes.Contains(convertTo)) 47 value = Convert.ChangeType(value, convertTo, CultureInfo.CurrentCulture);
Microsoft.ML.AutoML.SourceGenerator (10)
Template\EstimatorType.cs (2)
206this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 213this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Template\SearchSpace.cs (2)
223this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 230this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Template\SweepableEstimator.cs (2)
225this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 232this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Template\SweepableEstimator_T_.cs (2)
230this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 237this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Template\SweepableEstimatorFactory.cs (2)
201this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 208this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Microsoft.ML.CodeGenerator (20)
Templates\Azure\Console\AzureModelBuilder.cs (2)
300this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 307this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Azure\Model\AzureImageModelOutputClass.cs (2)
241this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 248this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (2)
241this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 248this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\ConsumeModel.cs (2)
252this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 259this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\ModelBuilder.cs (2)
617this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 624this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\ModelInputClass.cs (2)
215this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 222this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\ModelOutputClass.cs (2)
258this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 265this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\ModelProject.cs (2)
247this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 254this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\PredictProgram.cs (2)
274this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 281this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Templates\Console\PredictProject.cs (2)
252this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args)); 259this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
234Return CultureInfo.CurrentCulture
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
2166m_SearchText = Text.ToUpper(CultureInfo.CurrentCulture)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTests.cs (1)
94=> (ImmutableArray<DocumentSymbolDataViewModel>)DocumentSymbolDataViewModelSorter.Instance.Convert([items, sortOption], typeof(ImmutableArray<DocumentSymbolDataViewModel>), parameter: null, CultureInfo.CurrentCulture);
PresentationBuildTasks (16)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
2278(i + 1).ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (3)
1317numberOfConstructorAttributes.ToString(CultureInfo.CurrentCulture), 1737lineNumber.ToString(CultureInfo.CurrentCulture), 1738linePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (6)
233lineNumber.ToString(CultureInfo.CurrentCulture), 234linePosition.ToString(CultureInfo.CurrentCulture))}"; 890xamlDefAttributeNode.LineNumber.ToString(CultureInfo.CurrentCulture), 891xamlDefAttributeNode.LinePosition.ToString(CultureInfo.CurrentCulture)); 1350lineNumber.ToString(CultureInfo.CurrentCulture), 1351linePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (4)
1386lineNumber.ToString(CultureInfo.CurrentCulture), 1387linePosition.ToString(CultureInfo.CurrentCulture)); 1410LineNumber.ToString(CultureInfo.CurrentCulture), 1411LinePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (2)
692lineNumber.ToString(CultureInfo.CurrentCulture), 693linePosition.ToString(CultureInfo.CurrentCulture));
PresentationCore (7)
MS\Internal\TextFormatting\LineServicesCallbacks.cs (1)
1546return CultureInfo.CurrentCulture;
MS\Internal\TextFormatting\NumberSubstitution.cs (1)
132return CultureInfo.CurrentCulture;
System\Windows\Input\Stylus\Common\StylusButton.cs (1)
101return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Common\StylusDevice.cs (1)
163return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Common\TabletDeviceBase.cs (1)
180return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), Name);
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (1)
1088return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (1)
162return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), Name);
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)
MS\Internal\Data\CollectionViewGroupRoot.cs (1)
670nameStr = nameStr.ToUpper(CultureInfo.CurrentCulture);
MS\Internal\Data\SortFieldComparer.cs (1)
36: (culture == CultureInfo.CurrentCulture) ? Comparer.Default
MS\Internal\Documents\DocumentViewerHelper.cs (2)
262cultureInfo = CultureInfo.CurrentCulture; 280messageString = String.Format(System.Globalization.CultureInfo.CurrentCulture, messageString, findToolBar.SearchText);
System\Windows\Controls\DataGridClipboardHelper.cs (2)
24FormatPlainText(cellValue.ToString(), csv, new StringWriter(sb, CultureInfo.CurrentCulture), ref escapeApplied); 53FormatPlainTextAsHtml(cellValue.ToString(), new StringWriter(sb, CultureInfo.CurrentCulture));
System\Windows\Controls\DatePicker.cs (2)
1287this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.DatePicker_WatermarkText, dtfi.LongDatePattern.ToString()); 1293this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.DatePicker_WatermarkText, dtfi.ShortDatePattern.ToString());
System\Windows\Controls\DateTimeHelper.cs (2)
104return GetDateFormat(CultureInfo.CurrentCulture); 117culture = CultureInfo.CurrentCulture;
System\Windows\Controls\DocumentViewer.cs (2)
1907columnValue = System.Convert.ToInt32((string)data, CultureInfo.CurrentCulture); 2151CultureInfo.CurrentCulture,
System\Windows\Controls\MenuItem.cs (1)
1136return keyGesture.GetDisplayStringForCulture(CultureInfo.CurrentCulture);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1531pageNumber = Convert.ToInt32(args.Parameter, System.Globalization.CultureInfo.CurrentCulture);
System\Windows\Controls\TextRangeAdaptor.cs (1)
1771ITextRange findResult = TextFindEngine.Find(_start, _end, text, findFlags, CultureInfo.CurrentCulture);
System\Windows\Controls\TextSearch.cs (1)
311CompareInfo compareInfo = (cultureInfo ?? CultureInfo.CurrentCulture).CompareInfo;
System\Windows\Documents\FixedDocument.cs (1)
667ApplicationException ae = new ApplicationException(string.Format(System.Globalization.CultureInfo.CurrentCulture, SR.ExceptionInGetPage, index), e);
System\Windows\Documents\RtfToXamlLexer.cs (1)
36_currentCodePage = CultureInfo.CurrentCulture.TextInfo.ANSICodePage;
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
672throw new XamlParseException(string.Format(CultureInfo.CurrentCulture, SR.Format(SR.UnknownBamlRecord, recordType)));
System\Windows\Markup\BamlReader.cs (3)
461_value = _connectionId.ToString(CultureInfo.CurrentCulture); 658((int)_currentBamlRecord.RecordType).ToString(CultureInfo.CurrentCulture))); 1679((int)_currentBamlRecord.RecordType).ToString(CultureInfo.CurrentCulture)));
System\Windows\Markup\BamlRecordReader.cs (3)
763ThrowException(nameof(SR.ParserUnknownBaml), ((int)bamlRecord.RecordType).ToString(CultureInfo.CurrentCulture)); 1563ThrowException(nameof(SR.ParserBadConstructorParams), elementType.Name, paramCount.ToString(CultureInfo.CurrentCulture)); 1799ThrowException(nameof(SR.ParserUnexpInBAML), keyRecord.RecordType.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\BamlVersionHeader.cs (4)
81(BamlVersion.ReaderVersion.Major.ToString(CultureInfo.CurrentCulture) + "." + 82BamlVersion.ReaderVersion.Minor.ToString(CultureInfo.CurrentCulture)), 83(BamlWriterVersion.Major.ToString(CultureInfo.CurrentCulture) + "." + 84BamlWriterVersion.Minor.ToString(CultureInfo.CurrentCulture))));
System\Windows\Markup\MarkupExtensionParser.cs (2)
1737lineNumber.ToString(CultureInfo.CurrentCulture), 1738linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlParser.cs (2)
1350lineNumber.ToString(CultureInfo.CurrentCulture), 1351linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlStyleSerializer.cs (2)
154lineNumber.ToString(CultureInfo.CurrentCulture), 155linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlTypeMapper.cs (2)
692lineNumber.ToString(CultureInfo.CurrentCulture), 693linePosition.ToString(CultureInfo.CurrentCulture));
PresentationFramework.Tests (2)
System\Windows\Controls\VirtualizationCacheLengthConverter.Tests.cs (2)
284yield return new object[] { new VirtualizationCacheLength(0.3, 0.4), typeof(int), CultureInfo.CurrentCulture }; 292yield return new object[] { new VirtualizationCacheLength(0.9, 0.9), typeof(VirtualizationCacheLength), CultureInfo.CurrentCulture };
PresentationUI (31)
MS\Internal\Documents\Application\AddressUtility.cs (2)
47CultureInfo.CurrentCulture, 68CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\Document.cs (1)
314System.Globalization.CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\DocumentPropertiesDialog.cs (3)
160CultureInfo.CurrentCulture, 222CultureInfo.CurrentCulture, 228CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\DocumentStream.cs (2)
817CultureInfo.CurrentCulture, 823generation.ToString(CultureInfo.CurrentCulture)
MS\Internal\Documents\Application\PageTextBox.cs (2)
66if (CultureInfo.CurrentCulture != null) 68this.Text = pageNumber.ToString(CultureInfo.CurrentCulture);
MS\Internal\Documents\Application\Trace.cs (2)
27CultureInfo.CurrentCulture, 45CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\ZoomComboBox.cs (1)
465zoomString = String.Format(CultureInfo.CurrentCulture,
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
1849CultureInfo culture = CultureInfo.CurrentCulture; 1971CultureInfo culture = CultureInfo.CurrentCulture;
MS\Internal\Documents\DocumentSignatureManager.cs (1)
605CultureInfo.CurrentCulture,
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
213String.Format(CultureInfo.CurrentCulture,
MS\Internal\Documents\RightsManagementResourceHelper.cs (3)
76CultureInfo.CurrentCulture, 82CultureInfo.CurrentCulture, 88CultureInfo.CurrentCulture,
MS\Internal\Documents\RMPublishingDialog.cs (1)
466CultureInfo.CurrentCulture,
MS\Internal\Documents\SignatureResourceHelper.cs (6)
208string sigSummary = string.Format(CultureInfo.CurrentCulture, 216certSummary = string.Format(CultureInfo.CurrentCulture, 223result = string.Format(CultureInfo.CurrentCulture, 235result = string.Format(CultureInfo.CurrentCulture, 325CultureInfo.CurrentCulture, 363CultureInfo.CurrentCulture,
MS\Internal\Documents\SigningDialog.cs (1)
168_signerlabel.Text = String.Format(CultureInfo.CurrentCulture,
TenFeetInstallationProgress.xaml.cs (3)
120CurrentBytesText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarKiloBytesStringFormat, (bytesDownloaded / 1024)); 121TotalBytesText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarKiloBytesStringFormat, (bytesTotal / 1024)); 127ProgressBarStatusText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarPercentageStringFormat, percentDone);
ReachFramework (43)
PrintConfig\DocumentNUp.cs (2)
61return PagesPerSheet.ToString(CultureInfo.CurrentCulture); 556return PagesPerSheet.ToString(CultureInfo.CurrentCulture) + ", " +
PrintConfig\FallbackPTProvider.cs (1)
110CultureInfo.CurrentCulture,
PrintConfig\PageCopyCount.cs (1)
103return Value.ToString(CultureInfo.CurrentCulture);
PrintConfig\PageMediaSize.cs (4)
84return Value.ToString() + ": " + MediaSizeWidth.ToString(CultureInfo.CurrentCulture) + 85" x " + MediaSizeHeight.ToString(CultureInfo.CurrentCulture); 529": MediaSizeWidth=" + MediaSizeWidth.ToString(CultureInfo.CurrentCulture) + 530", MediaSizeHeight=" + MediaSizeHeight.ToString(CultureInfo.CurrentCulture);
PrintConfig\PageResolution.cs (4)
85return ResolutionX.ToString(CultureInfo.CurrentCulture) + " x " + 86ResolutionY.ToString(CultureInfo.CurrentCulture) + " (Qualitative: " + 420return ResolutionX.ToString(CultureInfo.CurrentCulture) + "x" + 421ResolutionY.ToString(CultureInfo.CurrentCulture) +
PrintConfig\PageScaling.cs (3)
549", ScaleWidth=" + CustomScaleWidth.ToString(CultureInfo.CurrentCulture) + 550", ScaleHeight=" + CustomScaleHeight.ToString(CultureInfo.CurrentCulture) + 551", SquareScale=" + CustomSquareScale.ToString(CultureInfo.CurrentCulture);
PrintConfig\PrtCap_Public.cs (2)
457return new FormatException(String.Format(CultureInfo.CurrentCulture, 497throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtCap_Public_Simple.cs (2)
97return String.Format(CultureInfo.CurrentCulture, "({0}, {1}), ({2}, {3})", 162return String.Format(CultureInfo.CurrentCulture, "({0}, {1})",
PrintConfig\PrtCap_Reader.cs (8)
50throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 70throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 84throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 93throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 290throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 318throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 346throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 364throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Editor.cs (7)
44throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 58throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 71throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 81throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 105throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 116throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 221throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Public.cs (1)
523return new FormatException(String.Format(CultureInfo.CurrentCulture,
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") +
PrintConfig\PTProvider.cs (3)
231throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 336throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 497throw new ArgumentException(String.Format(CultureInfo.CurrentCulture,
Swaggatherer (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
System.Collections.NonGeneric (5)
System\Collections\CaseInsensitiveComparer.cs (2)
24_compareInfo = CultureInfo.CurrentCulture.CompareInfo; 38return new CaseInsensitiveComparer(CultureInfo.CurrentCulture);
System\Collections\CaseInsensitiveHashCodeProvider.cs (1)
20_compareInfo = CultureInfo.CurrentCulture.CompareInfo;
System\Collections\SortedList.cs (2)
85comparer = new Comparer(CultureInfo.CurrentCulture); 101comparer = new Comparer(CultureInfo.CurrentCulture);
System.ComponentModel.Annotations (12)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (1)
30CultureInfo.CurrentCulture, ErrorMessageString, name, OtherPropertyDisplayName ?? OtherProperty);
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (2)
200return string.Format(CultureInfo.CurrentCulture, _lastMessage, name); 331convertedValue = Convert.ChangeType(value, expectedValueType, CultureInfo.CurrentCulture);
System\ComponentModel\DataAnnotations\FileExtensionsAttribute.cs (1)
43string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, ExtensionsFormatted);
System\ComponentModel\DataAnnotations\LengthAttribute.cs (1)
80string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, MinimumLength, MaximumLength);
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
97string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, Length);
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (1)
80string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, Length);
System\ComponentModel\DataAnnotations\RangeAttribute.cs (1)
179return string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, Minimum, Maximum);
System\ComponentModel\DataAnnotations\RegularExpressionAttribute.cs (2)
61string? stringValue = Convert.ToString(value, CultureInfo.CurrentCulture); 91return string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name, Pattern);
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (1)
78return string.Format(CultureInfo.CurrentCulture, errorMessage, name, MaximumLength, MinimumLength);
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
331string.Format(CultureInfo.CurrentCulture, ErrorMessageString, name);
System.ComponentModel.Composition (10)
System\ComponentModel\Composition\CompositionError.cs (1)
180return new CompositionError(id, string.Format(CultureInfo.CurrentCulture, format, parameters), element, exception);
System\ComponentModel\Composition\CompositionException.cs (6)
178CultureInfo.CurrentCulture, 186CultureInfo.CurrentCulture, 199CultureInfo.CurrentCulture, 220writer.Append(ordinal.ToString(CultureInfo.CurrentCulture)); 252writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_ElementPrefix, element.DisplayName); 256writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_OriginFormat, SR.CompositionException_OriginSeparator, element.DisplayName);
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
118return string.Format(CultureInfo.CurrentCulture, format, arguments);
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (2)
379builder.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator); 389builder.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator);
System.ComponentModel.TypeConverter (27)
System\ComponentModel\BaseNumberConverter.cs (2)
72culture ??= CultureInfo.CurrentCulture; 96culture ??= CultureInfo.CurrentCulture;
System\ComponentModel\CultureInfoConverter.cs (1)
259CompareInfo compInfo = (CultureInfo.CurrentCulture).CompareInfo;
System\ComponentModel\DateOnlyConverter.cs (1)
86culture ??= CultureInfo.CurrentCulture;
System\ComponentModel\DateTimeConverter.cs (1)
91culture ??= CultureInfo.CurrentCulture;
System\ComponentModel\DateTimeOffsetConverter.cs (1)
93culture ??= CultureInfo.CurrentCulture;
System\ComponentModel\DecimalConverter.cs (1)
61return Convert.ToDecimal(value, CultureInfo.CurrentCulture);
System\ComponentModel\DoubleConverter.cs (1)
29return Convert.ToDouble(value, CultureInfo.CurrentCulture);
System\ComponentModel\MaskedTextProvider.cs (2)
231culture ??= CultureInfo.CurrentCulture; 794throw new IndexOutOfRangeException(index.ToString(CultureInfo.CurrentCulture));
System\ComponentModel\SingleConverter.cs (1)
27internal override object FromString(string value, int radix) => Convert.ToSingle(value, CultureInfo.CurrentCulture);
System\ComponentModel\TimeOnlyConverter.cs (1)
86culture ??= CultureInfo.CurrentCulture;
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\Drawing\ColorConverter.cs (2)
42return ColorConverterCommon.ConvertFromString(strValue, culture ?? CultureInfo.CurrentCulture); 72culture ??= CultureInfo.CurrentCulture;
System\Drawing\PointConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 64culture ??= CultureInfo.CurrentCulture;
System\Drawing\RectangleConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 66culture ??= CultureInfo.CurrentCulture;
System\Drawing\SizeConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 64culture ??= CultureInfo.CurrentCulture;
System\Drawing\SizeFConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 64culture ??= CultureInfo.CurrentCulture;
System.Configuration.ConfigurationManager (2)
System\Configuration\ConfigurationErrorsException.cs (2)
151? BareMessage + " (" + file + " line " + Line.ToString(CultureInfo.CurrentCulture) + ")" 156? BareMessage + " (line " + Line.ToString("G", CultureInfo.CurrentCulture) + ")"
System.Data.Common (19)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
478internal static int DstCompare(string strA, string strB) => CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.DefaultCompareOptions);
System\Data\Constraint.cs (1)
42CultureInfo locale = (Table != null ? Table.Locale : CultureInfo.CurrentCulture);
System\Data\DataColumn.cs (2)
412((null != _table) ? _table.FormatProvider : CultureInfo.CurrentCulture); 416((null != _table) ? _table.Locale : CultureInfo.CurrentCulture);
System\Data\DataRelation.cs (1)
364CultureInfo locale = (_dataSet != null ? _dataSet.Locale : CultureInfo.CurrentCulture);
System\Data\DataSet.cs (1)
98_culture = CultureInfo.CurrentCulture; // Set default locale
System\Data\DataTable.cs (1)
171_culture = CultureInfo.CurrentCulture;
System\Data\DataTableExtensions.cs (1)
119Locale = CultureInfo.CurrentCulture
System\Data\DataView.cs (2)
323CultureInfo locale = (_table != null ? _table.Locale : CultureInfo.CurrentCulture); 436CultureInfo locale = (_table != null ? _table.Locale : CultureInfo.CurrentCulture);
System\Data\Filter\ExpressionNode.cs (1)
23return ((null != _table) ? _table.FormatProvider : System.Globalization.CultureInfo.CurrentCulture);
System\Data\SQLTypes\SQLDateTime.cs (1)
354DateTimeFormatInfo dtfi = (DateTimeFormatInfo)(CultureInfo.CurrentCulture.GetFormat(typeof(DateTimeFormatInfo)))!;
System\Data\SQLTypes\SQLString.cs (1)
191public SqlString(string? data) : this(data, System.Globalization.CultureInfo.CurrentCulture.LCID, s_iDefaultFlag)
System\Data\xmlsaver.cs (2)
1034if (dataSet.ShouldSerializeLocale() || !dataSet.Locale.Equals(CultureInfo.CurrentCulture)) 1056if (dt.ShouldSerializeLocale() || !dt.Locale.Equals(CultureInfo.CurrentCulture))
System\Data\XMLSchema.cs (4)
2027string tmp = (-1).ToString(CultureInfo.CurrentCulture); 2141string tmp = (-1).ToString(CultureInfo.CurrentCulture); 2529string tmp = GetStringAttribute(elem, Keywords.MSD_ORDINAL, (-1).ToString(CultureInfo.CurrentCulture)); 2587_ds!.SetLocaleValue(CultureInfo.CurrentCulture, false);
System.Data.Odbc (7)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
478internal static int DstCompare(string strA, string strB) => CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.DefaultCompareOptions);
System\Data\Odbc\OdbcParameter.cs (5)
684value = ((decimal)value).ToString(CultureInfo.CurrentCulture); 698value = ((long)value).ToString(CultureInfo.CurrentCulture); 742int lcid = System.Globalization.CultureInfo.CurrentCulture.LCID; 969int lcid = System.Globalization.CultureInfo.CurrentCulture.LCID; 979Value = decimal.Parse((string)Value, System.Globalization.CultureInfo.CurrentCulture);
System\Data\Odbc\OdbcParameterCollectionHelper.cs (1)
333name = ADP.Parameter + index.ToString(CultureInfo.CurrentCulture);
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
163_xmlBlobWriter = new XmlTextWriter(new StringWriter(_strBldr, CultureInfo.CurrentCulture));
System.Drawing.Common.Tests (1)
System\Drawing\FontConverterTests.cs (1)
42public static char Separator { get; } = CultureInfo.CurrentCulture.TextInfo.ListSeparator[0];
System.Drawing.Primitives (1)
System\Drawing\ColorTranslator.cs (1)
274c = ColorConverterCommon.ConvertFromString(htmlColor, CultureInfo.CurrentCulture);
System.Linq.Expressions (1)
System\Linq\Expressions\Expression.cs (1)
230using (System.IO.StringWriter writer = new System.IO.StringWriter(CultureInfo.CurrentCulture))
System.Private.CoreLib (58)
src\libraries\System.Private.CoreLib\src\System\Char.cs (2)
507return CultureInfo.CurrentCulture.TextInfo.ToUpper(c); 536return CultureInfo.CurrentCulture.TextInfo.ToLower(c);
src\libraries\System.Private.CoreLib\src\System\Collections\Comparer.cs (1)
20public static readonly Comparer Default = new Comparer(CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (2)
125return ChangeType(value, typeCode, CultureInfo.CurrentCulture); 225return ChangeType(value, conversionType, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (2)
1926return GetDateTimeFormats(CultureInfo.CurrentCulture); 1942return GetDateTimeFormats(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
5997ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true);
src\libraries\System.Private.CoreLib\src\System\FormattableString.cs (2)
81return formattable.ToString(Globalization.CultureInfo.CurrentCulture); 85ToString(Globalization.CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Unix.cs (1)
53internal static unsafe CultureData GetCurrentRegionData() => CultureInfo.CurrentCulture._cultureData;
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
300CultureInfo culture = CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
400CultureInfo culture = CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (2)
23: this(new StringBuilder(), CultureInfo.CurrentCulture) 34public StringWriter(StringBuilder sb) : this(sb, CultureInfo.CurrentCulture)
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
51=> _internalFormatProvider ?? CultureInfo.CurrentCulture;
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\MemoryExtensions.Globalization.Utf8.cs (1)
42return CultureInfo.CurrentCulture.CompareInfo.IsPrefixUtf8(span, value, string.GetCaseCompareOfComparisonCulture(comparisonType));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (2)
752public override string ToString() => ToString("G", CultureInfo.CurrentCulture); 757public string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (2)
1067public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1075public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (2)
1080public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1088public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (2)
1113public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1121public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (12)
241return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, GetCaseCompareOfComparisonCulture(comparisonType)); 271CultureInfo compareCulture = culture ?? CultureInfo.CurrentCulture; 332return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, indexA, lengthA, strB, indexB, lengthB, options); 352CultureInfo compareCulture = culture ?? CultureInfo.CurrentCulture; 410return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, indexA, lengthA, strB, indexB, lengthB, GetCaseCompareOfComparisonCulture(comparisonType)); 558return CultureInfo.CurrentCulture.CompareInfo.IsSuffix(this, value, GetCaseCompareOfComparisonCulture(comparisonType)); 588CultureInfo referenceCulture = culture ?? CultureInfo.CurrentCulture; 666return CultureInfo.CurrentCulture.CompareInfo.Compare(this, value, GetCaseCompareOfComparisonCulture(comparisonType)) == 0; 724return CultureInfo.CurrentCulture.CompareInfo.Compare(a, b, GetCaseCompareOfComparisonCulture(comparisonType)) == 0; 789return CultureInfo.CurrentCulture.CompareInfo.GetHashCode(value, GetCaseCompareOfComparisonCulture(comparisonType)); 1127return CultureInfo.CurrentCulture.CompareInfo.IsPrefix(this, value, GetCaseCompareOfComparisonCulture(comparisonType)); 1166CultureInfo referenceCulture = culture ?? CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (5)
991var result = new DefaultInterpolatedStringHandler(0, 0, CultureInfo.CurrentCulture, stackalloc char[StackallocCharBufferSizeLimit]); 1199StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => ReplaceCore(oldValue, newValue, CultureInfo.CurrentCulture.CompareInfo, GetCaseCompareOfComparisonCulture(comparisonType)), 1216return ReplaceCore(this, oldValue.AsSpan(), newValue.AsSpan(), ci ?? CultureInfo.CurrentCulture.CompareInfo, options) 2300CultureInfo cult = culture ?? CultureInfo.CurrentCulture; 2315CultureInfo cult = culture ?? CultureInfo.CurrentCulture;
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (3)
59StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, GetCaseCompareOfComparisonCulture(comparisonType)), 258StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)), 383StringComparison.CurrentCulture or StringComparison.CurrentCultureIgnoreCase => CultureInfo.CurrentCulture.CompareInfo.LastIndexOf(this, value, startIndex, count, GetCaseCompareOfComparisonCulture(comparisonType)),
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (2)
22new CultureAwareComparer(CultureInfo.CurrentCulture, CompareOptions.None); 25new CultureAwareComparer(CultureInfo.CurrentCulture, CompareOptions.IgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
312return CultureInfo.CurrentCulture;
System.Private.Windows.Core.TestUtilities (9)
ThreadCultureChange.cs (3)
9/// Facilitates temporarily changing the <see cref="CultureInfo.CurrentCulture"/> and <see cref="CultureInfo.CurrentUICulture"/>. 13private readonly CultureInfo _originalCulture = CultureInfo.CurrentCulture; 30_originalCulture = CultureInfo.CurrentCulture;
XUnit\UseCultureAttribute.cs (5)
16/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> with another culture. 68/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> 87CultureInfo.CurrentCulture.ClearCachedData(); 92/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and 106CultureInfo.CurrentCulture.ClearCachedData();
XUnit\UseDefaultXunitCultureAttribute.cs (1)
10/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> with another culture.
System.Private.Xml (5)
System\Xml\Serialization\CodeIdentifiers.cs (2)
14public CaseInsensitiveKeyComparer() : base(CultureInfo.CurrentCulture) 29return CultureInfo.CurrentCulture.TextInfo.ToUpper(s).GetHashCode();
System\Xml\XPath\Internal\CompiledXPathExpr.cs (1)
165_cinfo = CultureInfo.CurrentCulture;
System\Xml\Xsl\Runtime\XmlCollation.cs (1)
418return CultureInfo.CurrentCulture;
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
534return CultureInfo.CurrentCulture;
System.Runtime.Caching (1)
System\Runtime\Caching\Resources\RH.cs (1)
13return string.Format(CultureInfo.CurrentCulture, resource, args);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (1)
662FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\FaultExceptionTest.cs (1)
86Assert.Equal(CultureInfo.CurrentCulture.Name, faultReasonText.XmlLang);
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\Regex.Cache.cs (1)
119CultureInfo culture = CultureInfo.CurrentCulture;
System\Text\RegularExpressions\Regex.cs (1)
253RegexTree tree = RegexParser.Parse(pattern, options, (options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture);
System\Text\RegularExpressions\RegexParser.cs (2)
87(options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture; 140CultureInfo culture = (options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture;
System.Text.RegularExpressions.Generator (3)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (2)
87(options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture; 140CultureInfo culture = (options & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture;
UpgradeToGeneratedRegexCodeFixer.cs (1)
215cultureNameValue = generator.LiteralExpression(CultureInfo.CurrentCulture.Name);
System.Web.HttpUtility (1)
System\Web\HttpUtility.cs (1)
150_ => HtmlEncode(Convert.ToString(value, CultureInfo.CurrentCulture) ?? string.Empty),
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\KeyTipService.cs (1)
902CultureInfo culture = CultureInfo.CurrentCulture;
System.Windows.Forms (99)
System\Windows\Forms\ActiveX\AxHost.cs (1)
1762wParam = (WPARAM)char.ToUpper(charCode, CultureInfo.CurrentCulture),
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
909? string.Format(CultureInfo.CurrentCulture, SR.DispInvokeFailed, "SetValue", setError)
System\Windows\Forms\Control.cs (4)
6375char c2 = char.ToUpper(charCode, CultureInfo.CurrentCulture); 6389char c1 = char.ToUpper(text[pos], CultureInfo.CurrentCulture); 6391if (c1 == c2 || char.ToLower(c1, CultureInfo.CurrentCulture) == char.ToLower(c2, CultureInfo.CurrentCulture))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
1090if (string.Compare(candidate, base.Text, true, CultureInfo.CurrentCulture) == 0) 1124|| string.Compare(value, GetItemText(selectedItem), ignoreCase: false, CultureInfo.CurrentCulture) != 0)
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
421if (string.Compare(_owner.GetItemText(value), _owner.NativeGetItemText(index), true, CultureInfo.CurrentCulture) != 0)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
27458throw new ArgumentOutOfRangeException(nameof(width), width, string.Format(SR.DataGridView_SizeTooLarge, (UpperSize).ToString(CultureInfo.CurrentCulture))); 27463throw new ArgumentOutOfRangeException(nameof(height), height, string.Format(SR.DataGridView_SizeTooLarge, (UpperSize).ToString(CultureInfo.CurrentCulture)));
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
222!defaultCellStyle.FormatProvider.Equals(Globalization.CultureInfo.CurrentCulture) ||
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1331using StringWriter sw = new(sb, CultureInfo.CurrentCulture); 1368using StringWriter sw = new(sb, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
193get => Properties.GetValueOrDefault<IFormatProvider>(s_propFormatProvider) ?? Globalization.CultureInfo.CurrentCulture;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
308!defaultCellStyle.FormatProvider.Equals(Globalization.CultureInfo.CurrentCulture) ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
223!defaultCellStyle.FormatProvider.Equals(CultureInfo.CurrentCulture) ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
149using StringWriter sw = new(stringBuilder, CultureInfo.CurrentCulture); 180using StringWriter sw = new(stringBuilder, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1038? Convert.ToString(displayValue, CultureInfo.CurrentCulture) 2411throw new FormatException(string.Format(CultureInfo.CurrentCulture, SR.Formatter_CantConvert, value, DisplayType));
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
47if (string.Compare(valueStr, Text, true, CultureInfo.CurrentCulture) != 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
284!defaultCellStyle.FormatProvider.Equals(Globalization.CultureInfo.CurrentCulture) ||
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
101return string.Format(SR.DataGridView_AccRowName, index.ToString(CultureInfo.CurrentCulture));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (2)
120using StringWriter sw = new(stringBuilder, CultureInfo.CurrentCulture); 152using StringWriter sw = new(stringBuilder, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (4)
629DateTime maxSupportedDateTime = CultureInfo.CurrentCulture.Calendar.MaxSupportedDateTime; 689DateTime minSupportedDateTime = CultureInfo.CurrentCulture.Calendar.MinSupportedDateTime; 835Value = DateTime.Parse(value, CultureInfo.CurrentCulture); 1009return value.ToString("G", CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (2)
61culture ??= CultureInfo.CurrentCulture; 92culture ??= CultureInfo.CurrentCulture;
System\Windows\Forms\Controls\Labels\LinkConverter.cs (2)
57culture ??= CultureInfo.CurrentCulture; 88culture ??= CultureInfo.CurrentCulture;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1089if (string.Compare(value, GetItemText(Items[index]), true, CultureInfo.CurrentCulture) == 0)
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (1)
424if (string.Compare(_owner.GetItemText(value), _owner.NativeGetItemText(index), true, CultureInfo.CurrentCulture) != 0)
System\Windows\Forms\Controls\ListControl\ListControl.cs (4)
498found = string.Compare(str, GetItemText(items[index]), ignoreCase, CultureInfo.CurrentCulture) == 0; 502found = string.Compare(str, 0, GetItemText(items[index]), 0, str.Length, ignoreCase, CultureInfo.CurrentCulture) == 0; 529return Convert.ToString(item, CultureInfo.CurrentCulture); 568return Convert.ToString(item, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
3351if (isPrefixSearch && CultureInfo.CurrentCulture.CompareInfo.IsPrefix(listViewSubItem.Text, text, CompareOptions.IgnoreCase))
System\Windows\Forms\Controls\ListView\ListView.IconComparer.cs (2)
34return string.Compare(currentItem?.Text, nextItem?.Text, false, CultureInfo.CurrentCulture); 38return string.Compare(nextItem?.Text, currentItem?.Text, false, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarCellAccessibleObject.cs (1)
79CultureInfo culture = CultureInfo.CurrentCulture;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (2)
168=> CultureInfo.CurrentCulture.Calendar 169.GetWeekOfYear(date, CultureInfo.CurrentCulture.DateTimeFormat.CalendarWeekRule,
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (5)
1139private static string FormatDate(DateTime value) => value.ToString("d", CultureInfo.CurrentCulture); 1761throw new ArgumentOutOfRangeException(nameof(x), string.Format(SR.MonthCalendarInvalidDimensions, (x).ToString("D", CultureInfo.CurrentCulture), (y).ToString("D", CultureInfo.CurrentCulture))); 1766throw new ArgumentOutOfRangeException(nameof(y), string.Format(SR.MonthCalendarInvalidDimensions, (x).ToString("D", CultureInfo.CurrentCulture), (y).ToString("D", CultureInfo.CurrentCulture)));
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (2)
61culture ??= CultureInfo.CurrentCulture; 100culture ??= CultureInfo.CurrentCulture;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.DisplayNameSortComparer.cs (1)
20CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.PropertyDescriptorComparer.cs (1)
36result = string.Compare(a1.PropertyType.FullName, a2.PropertyType.FullName, true, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2442currentValue = entry.TypeConverter.ConvertTo(entry, CultureInfo.CurrentCulture, currentValue, value.GetType()); 2449equal = string.Compare(@string, currentValue.ToString(), true, CultureInfo.CurrentCulture) == 0;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (4)
111MaskedTextProvider maskedTextProvider = new(NullMask, CultureInfo.CurrentCulture); 123MaskedTextProvider maskedTextProvider = new(mask, CultureInfo.CurrentCulture); 2465Culture = CultureInfo.CurrentCulture; 2670return !CultureInfo.CurrentCulture.Equals(Culture);
System\Windows\Forms\Controls\ToolStrips\OpacityConverter.cs (2)
37double val = double.Parse(text, CultureInfo.CurrentCulture); 42text = val.ToString(CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
2563char charToCompare = char.ToUpper(charCode, CultureInfo.CurrentCulture); 2564char firstLetter = char.ToUpper(text[0], CultureInfo.CurrentCulture); 2565if (firstLetter == charToCompare || (char.ToLower(charCode, CultureInfo.CurrentCulture) == char.ToLower(text[0], CultureInfo.CurrentCulture)))
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerTypedControlCollection.cs (1)
37throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfTypes, _contentPanelType.Name, _panelType.Name)), value.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
52throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))), control.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
257Debug.Write(_thisRowID.ToString(CultureInfo.CurrentCulture));
System\Windows\Forms\Controls\UpDown\DomainUpDown.DomainUpDownItemCompare.cs (1)
25return string.Compare(p.ToString(), q.ToString(), false, CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (4)
450NumberFormatInfo numberFormatInfo = CultureInfo.CurrentCulture.NumberFormat; 541Value = Constrain(decimal.Parse(Text, CultureInfo.CurrentCulture)); 706text = num.ToString($"{(ThousandsSeparator ? "N" : "F")}{DecimalPlaces}", CultureInfo.CurrentCulture); 815: testNumber.ToString(CultureInfo.CurrentCulture);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
335wParam = (WPARAM)char.ToUpper(charCode, CultureInfo.CurrentCulture),
System\Windows\Forms\DataBinding\Binding.cs (4)
652cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 665cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 727object ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture); 801ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture);
System\Windows\Forms\DataBinding\BindingNavigator.cs (3)
565_positionItem?.Text = position.ToString(CultureInfo.CurrentCulture); 568_countItem?.Text = DesignMode ? CountItemFormat : string.Format(CultureInfo.CurrentCulture, CountItemFormat, count); 611newPosition = Convert.ToInt32(_positionItem.Text, CultureInfo.CurrentCulture) - 1;
System\Windows\Forms\DataBinding\CurrencyManager.cs (2)
258throw new IndexOutOfRangeException(string.Format(SR.ListManagerNoValue, index.ToString(CultureInfo.CurrentCulture))); 267throw new IndexOutOfRangeException(string.Format(SR.ListManagerNoValue, index.ToString(CultureInfo.CurrentCulture)));
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (3)
174detailsTextBuilder.AppendFormat(CultureInfo.CurrentCulture, sectionseparator, SR.ExDlgMsgExceptionSection); 177detailsTextBuilder.AppendFormat(CultureInfo.CurrentCulture, sectionseparator, SR.ExDlgMsgLoadedAssembliesSection); 194detailsTextBuilder.AppendFormat(CultureInfo.CurrentCulture, sectionseparator, SR.ExDlgMsgJITDebuggingSection);
System\Windows\Forms\Internal\Formatter.cs (3)
384formatInfo ??= CultureInfo.CurrentCulture; 423return string.Format(CultureInfo.CurrentCulture, stringResId, value, targetType.Name); 437return CultureInfo.CurrentCulture;
System\Windows\Forms\Internal\TypedControlCollection.cs (1)
48throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, _typeOfControl.Name)), value.GetType().Name);
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
218mnemonic = char.ToUpper(text[i + 1], CultureInfo.CurrentCulture); 222mnemonic = char.ToLower(text[i + 1], CultureInfo.CurrentCulture);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (1)
44culture ??= CultureInfo.CurrentCulture;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettingsTypeConverter.cs (4)
83xmlWriter.WriteAttributeString("Row", c.Row.ToString(CultureInfo.CurrentCulture)); 84xmlWriter.WriteAttributeString("RowSpan", c.RowSpan.ToString(CultureInfo.CurrentCulture)); 86xmlWriter.WriteAttributeString("Column", c.Column.ToString(CultureInfo.CurrentCulture)); 87xmlWriter.WriteAttributeString("ColumnSpan", c.ColumnSpan.ToString(CultureInfo.CurrentCulture));
System.Windows.Forms.Analyzers.CSharp.Tests (1)
ProjectFileReaderTests.cs (1)
16public static readonly char s_separator = CultureInfo.CurrentCulture.TextInfo.ListSeparator[0];
System.Windows.Forms.Design (30)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
212SizeF sizeW = g.MeasureString(c.ToString(CultureInfo.CurrentCulture), _listBox.Font); 564SizeF sizeW = g.MeasureString(maxC.ToString(CultureInfo.CurrentCulture), _listBox.Font); 608g.DrawString(e.Index.ToString(CultureInfo.CurrentCulture), Font, SystemBrushes.ControlText,
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
66string newItem = PropertyDescriptor.Converter.ConvertToString(TypeDescriptorContext, CultureInfo.CurrentCulture, standardValue)!;
System\ComponentModel\Design\DesignerActionPanel.PropertyLine.cs (1)
64newValue = PropertyDescriptor.Converter.ConvertFrom(_typeDescriptorContext, CultureInfo.CurrentCulture, newValue);
System\ComponentModel\Design\MenuCommandService.cs (1)
84throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.MenuCommandService_DuplicateCommand, commandId.ToString()));
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
1023span[i] = char.ToLower(baseName[i], CultureInfo.CurrentCulture);
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
1606_helpTextCtrl.Text = string.Format(CultureInfo.CurrentCulture, (SR.DesignBindingPickerHelpGenCurrentBinding), _selectedNode.Text); 2351resName = string.Format(CultureInfo.CurrentCulture, "DesignBindingPickerHelpNode{0}{1}{2}", dsType, nodeType, (CanSelect ? "1" : "0")); 2487public InstancesNode(string? rootComponentName) : base(null, string.Format(CultureInfo.CurrentCulture, (SR.DesignBindingPickerNodeInstances), rootComponentName), BindingImage.Instances)
System\Windows\Forms\Design\FormatControl.cs (1)
446return _value.ToString(FormatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormatControl.CurrencyFormatType.cs (1)
23(-1234.5678).ToString(FormatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormatControl.CustomFormatType.cs (4)
38label = s_dateTimeFormatValue.ToString(formatString, CultureInfo.CurrentCulture); 47label = (-1234.5678).ToString(formatString, CultureInfo.CurrentCulture); 61label = (-1234).ToString(formatString, CultureInfo.CurrentCulture); 75label = s_dateTimeFormatValue.ToString(formatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormatControl.DateTimeFormatType.cs (1)
31return s_dateTimeFormatValue.ToString(FormatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormatControl.NumericFormatType.cs (1)
23(-1234.5678).ToString(FormatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormatControl.ScientificFormatType.cs (1)
23(-1234.5678).ToString(FormatString, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\FormDocumentDesigner.cs (3)
170value.ToString(CultureInfo.CurrentCulture), 171(0.0f).ToString(CultureInfo.CurrentCulture), 172(1.0f).ToString(CultureInfo.CurrentCulture)),
System\Windows\Forms\Design\MaskedTextBoxDesigner.cs (1)
130return string.Format(CultureInfo.CurrentCulture, SR.MaskedTextBoxTextEditorErrorFormatString, e.Position, rejectionHint);
System\Windows\Forms\Design\StandardMenuStripVerb.cs (1)
472c = char.ToLower(c, CultureInfo.CurrentCulture);
System\Windows\Forms\Design\StyleEditorForm.cs (2)
558return value.ToString(CultureInfo.CurrentCulture); 563return (value / 100).ToString("P", CultureInfo.CurrentCulture);
System\Windows\Forms\Design\TabOrder.cs (1)
61NumberFormatInfo? formatInfo = (NumberFormatInfo?)CultureInfo.CurrentCulture.GetFormat(typeof(NumberFormatInfo));
System\Windows\Forms\Design\ToolStripDesigner.cs (3)
1739c = char.ToUpper(c, CultureInfo.CurrentCulture); 1759? char.ToUpper(c, CultureInfo.CurrentCulture) 1760: char.ToLower(c, CultureInfo.CurrentCulture);
System.Windows.Forms.Design.Tests (4)
System\Windows\Forms\Design\DataMemberFieldConverterTests.cs (3)
30Assert.Equal(expected, s_converter.ConvertFrom(s_context, CultureInfo.CurrentCulture, actual)); 39Assert.Equal(expected, s_converter.ConvertTo(s_context, CultureInfo.CurrentCulture, actual, expectedType)); 48() => s_converter.ConvertTo(s_context, CultureInfo.CurrentCulture, actual, expectedType));
System\Windows\Forms\Design\TabOrderTests.cs (1)
69((string)accessor._decimalSep).Should().Be(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator);
System.Windows.Forms.Primitives (3)
System\ComponentModel\TypeConverterHelper.cs (1)
30culture ??= CultureInfo.CurrentCulture;
System\Windows\Forms\PaddingConverter.cs (2)
35culture ??= CultureInfo.CurrentCulture; 49culture ??= CultureInfo.CurrentCulture;
System.Windows.Forms.Tests (40)
MaskedTextBoxTests.cs (1)
35_maskedTextBox.Culture.Should().Be(CultureInfo.CurrentCulture);
System\Windows\Forms\ApplicationTests.cs (2)
53Assert.Same(value, CultureInfo.CurrentCulture); 60Assert.Same(value, CultureInfo.CurrentCulture);
System\Windows\Forms\BindingTests.cs (4)
162yield return new object[] { string.Empty, new(), string.Empty, true, DataSourceUpdateMode.OnValidation - 1, DBNull.Value, string.Empty, CultureInfo.CurrentCulture }; 164yield return new object[] { "propertyName", new(), "dataMember.subDataMember", false, DataSourceUpdateMode.Never + 1, new(), "formatString", CultureInfo.CurrentCulture }; 245yield return new object[] { CultureInfo.CurrentCulture }; 447yield return new object[] { false, new ConvertEventArgs(1.1.ToString(CultureInfo.CurrentCulture), typeof(double)), 1.1 };
System\Windows\Forms\ControlBindingsCollectionTests.cs (5)
213Binding binding = collection.Add(nameof(Control.Text), 1, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture); 222Assert.Equal(CultureInfo.CurrentCulture, binding.FormatInfo); 235Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 249Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 266Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture));
System\Windows\Forms\DataGridViewCellStyleTests.cs (7)
26Assert.Equal(CultureInfo.CurrentCulture, style.FormatProvider); 92Assert.Equal(CultureInfo.CurrentCulture, style.FormatProvider); 346yield return new object[] { null, CultureInfo.CurrentCulture, true }; 377Assert.Equal(CultureInfo.CurrentCulture, style.FormatProvider); 760Assert.Equal(CultureInfo.CurrentCulture, style.FormatProvider); 826Assert.Equal(CultureInfo.CurrentCulture, style.FormatProvider); 938new DataGridViewCellStyle { FormatProvider = CultureInfo.CurrentCulture },
System\Windows\Forms\DateTimePickerTests.cs (9)
393DateTime maxSupportedDateTime = CultureInfo.CurrentCulture.Calendar.MaxSupportedDateTime; 435DateTime minSupportedDateTime = CultureInfo.CurrentCulture.Calendar.MinSupportedDateTime; 476_dateTimePicker.Text.Should().Be(DateTime.Parse(validDateString, CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 479_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 482_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 958DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 972DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 986DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 1000DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat;
System\Windows\Forms\ListControlTests.cs (11)
1357yield return new object[] { CultureInfo.CurrentCulture }; 1404control.FormatInfo = CultureInfo.CurrentCulture; 1405Assert.Equal(CultureInfo.CurrentCulture, control.FormatInfo); 1409control.FormatInfo = CultureInfo.CurrentCulture; 1410Assert.Equal(CultureInfo.CurrentCulture, control.FormatInfo); 1438control.FormatInfo = CultureInfo.CurrentCulture; 1439Assert.Equal(CultureInfo.CurrentCulture, control.FormatInfo); 1443control.FormatInfo = CultureInfo.CurrentCulture; 1444Assert.Equal(CultureInfo.CurrentCulture, control.FormatInfo); 1459control.FormatInfo = CultureInfo.CurrentCulture; 1460Assert.Equal(CultureInfo.CurrentCulture, control.FormatInfo);
System\Windows\Forms\MonthCalendarTests.cs (1)
1144int expected = (int)CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek + 6;
System.Windows.Input.Manipulations (5)
System\Windows\Input\Manipulations\Exceptions.cs (2)
204System.Globalization.CultureInfo.CurrentCulture, 239return string.Format(CultureInfo.CurrentCulture, format, args);
System\Windows\Input\Manipulations\PointF.cs (1)
148System.Globalization.CultureInfo.CurrentCulture,
System\Windows\Input\Manipulations\VectorD.cs (1)
456return ToString(System.Globalization.CultureInfo.CurrentCulture);
System\Windows\Input\Manipulations\VectorF.cs (1)
440System.Globalization.CultureInfo.CurrentCulture,
System.Xaml (3)
System\Xaml\Replacements\DateTimeOffsetConverter2.cs (2)
41return dtOffset.ToString("O", culture ?? CultureInfo.CurrentCulture); 81return DateTimeOffset.Parse(s.Trim(), culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None);
System\Xaml\XamlServices.cs (1)
130var sw = new StringWriter(CultureInfo.CurrentCulture);
System.Xaml.Tests (5)
System\Windows\Markup\NameReferenceConverterTests.cs (2)
70Assert.Throws<ArgumentNullException>("context", () => converter.ConvertFrom(null, CultureInfo.CurrentCulture, "name")); 162Assert.Throws<ArgumentNullException>("context", () => converter.ConvertTo(null, CultureInfo.CurrentCulture, "value", typeof(string)));
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)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
Templates.Mvc.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
Templates.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
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));
MS\Internal\AutomationProxies\EventManager.cs (1)
119System.Diagnostics.Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected idProp {0} for idOject 0x{1:x8} on element {2} for event {3}", idProp, idObject, el, eventId));
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (2)
151Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} and event/property {1} without matching AdviseEventAdded.", hwnd, key), "NativeMsaaProxy"); 157Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} without matching AdviseEventAdded.", hwnd), "NativeMsaaProxy");
MS\Internal\AutomationProxies\NonClientArea.cs (1)
108System.Diagnostics.Debug.Assert(idChild == 0, string.Format(CultureInfo.CurrentCulture, "Invalid Child Id, idChild == {2}\n\rClassName: \"{0}\"\n\rhwnd = 0x{1:x8}", Misc.ProxyGetClassName(hwnd), hwnd.ToInt32(), idChild));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (3)
308_sAutomationId = "Octet " + position.ToString(CultureInfo.CurrentCulture); // This string is a non-localizable string 380Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 393return double.Parse(s, CultureInfo.CurrentCulture);
MS\Internal\AutomationProxies\WindowsMenu.cs (5)
2449return string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", sCanonicalsKeyword, menuText.Substring(pos + cKeyChars + 1, cMenuChars - (pos + cKeyChars + 2)), Char.ToUpper(menuText[cMenuChars - 1], CultureInfo.InvariantCulture)); 2480return "F" + iKey.ToString(CultureInfo.CurrentCulture); 2506itemId = "Item " + result.ToString(CultureInfo.CurrentCulture); 2513itemId = "Item " + (_item + 1).ToString(CultureInfo.CurrentCulture); 2857_sAutomationId = "Item " + (item).ToString(CultureInfo.CurrentCulture);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
426_sAutomationId = "StatusBar.Pane" + item.ToString(CultureInfo.CurrentCulture); // This string is a non-localizable string
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
628itemId = "Item " + tbb.idCommand.ToString(CultureInfo.CurrentCulture);
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)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (2)
121CultureInfo.CurrentCulture, 424Out.WriteLine(string.Format(CultureInfo.CurrentCulture, "Specify --{0} for a list of available options and commands.", OptionHelp.LongName));
WindowsFormsIntegration (12)
System\Windows\Integration\ElementHost.cs (2)
119Debug.WriteLineIf(_traceLayout.TraceInfo, String.Format(CultureInfo.CurrentCulture, "AvalonAdapter({0}): MeasureOverride (constraint={1},result={2})", this.Name, proposedSize, prefSize)); 482string upperKey = Char.ToUpper(charCode, CultureInfo.CurrentCulture).ToString();
System\Windows\Integration\IntegrationExceptionEventArgs.cs (1)
20throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "exception"));
System\Windows\Integration\PropertyMap.cs (5)
82throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "propertyName")); 86throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "translator")); 128throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyMappingExists, propertyName)); 140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName)); 250throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_ArgumentNullOrEmpty, "propertyName"));
System\Windows\Integration\PropertyMappingExceptionEventArgs.cs (2)
24throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "exception")); 28throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_ArgumentNullOrEmpty, "propertyName"));
System\Windows\Integration\WindowsFormsHost.cs (2)
476Debug.WriteLineIf(_traceHandle.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "WindowsFormsHost({0}): BuildWindowCore (parent=0x{1:x8})", this.Name, hwndParent.Handle.ToInt32())); 1032Debug.WriteLineIf(WindowsFormsHost._traceLayout.TraceInfo, String.Format(CultureInfo.CurrentCulture, "WindowsFormsHost({0}): Layout invalidated (control='{1}',property='{2}')", _host.Name, compName, e.AffectedProperty));
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)
Record.cs (1)
86 throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "You must call Assert.{0} when testing async code", asyncMethodName));
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\AssertHelper.cs (4)
324 converted = Convert.ChangeType(value, targetType, CultureInfo.CurrentCulture); 447 return EquivalentException.ForCircularReference(string.Format(CultureInfo.CurrentCulture, "{0}.{1}", nameof(expected), prefix)); 450 return EquivalentException.ForCircularReference(string.Format(CultureInfo.CurrentCulture, "{0}.{1}", nameof(actual), prefix)); 548 CultureInfo.CurrentCulture,
Sdk\Exceptions\AllException.cs (4)
46 var maxItemIndexLength = errors.Max(x => x.Item1).ToString(CultureInfo.CurrentCulture).Length + 4; // "[#]: " 53 CultureInfo.CurrentCulture, 62 CultureInfo.CurrentCulture, 64 string.Format(CultureInfo.CurrentCulture, "[{0}]:", error.Item1).PadRight(maxItemIndexLength),
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\ContainsException.cs (7)
39 CultureInfo.CurrentCulture, 57 CultureInfo.CurrentCulture, 77 CultureInfo.CurrentCulture, 97 CultureInfo.CurrentCulture, 117 CultureInfo.CurrentCulture, 137 CultureInfo.CurrentCulture, 161 CultureInfo.CurrentCulture,
Sdk\Exceptions\DistinctException.cs (1)
40 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\DoesNotMatchException.cs (1)
46 CultureInfo.CurrentCulture,
Sdk\Exceptions\EmptyException.cs (2)
38 CultureInfo.CurrentCulture, 53 CultureInfo.CurrentCulture,
Sdk\Exceptions\EndsWithException.cs (1)
47 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\FalseException.cs (1)
44 CultureInfo.CurrentCulture,
Sdk\Exceptions\InRangeException.cs (1)
42 CultureInfo.CurrentCulture,
Sdk\Exceptions\IsAssignableFromException.cs (1)
47 CultureInfo.CurrentCulture,
Sdk\Exceptions\IsNotAssignableFromException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\IsNotTypeException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\IsTypeException.cs (1)
39 CultureInfo.CurrentCulture,
Sdk\Exceptions\MatchesException.cs (1)
44 CultureInfo.CurrentCulture,
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,
Sdk\Exceptions\NotInRangeException.cs (1)
42 CultureInfo.CurrentCulture,
Sdk\Exceptions\NotNullException.cs (1)
37 CultureInfo.CurrentCulture,
Sdk\Exceptions\NotStrictEqualException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\NullException.cs (2)
50 CultureInfo.CurrentCulture, 74 CultureInfo.CurrentCulture,
Sdk\Exceptions\ProperSubsetException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\ProperSupersetException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\PropertyChangedException.cs (1)
36 CultureInfo.CurrentCulture,
Sdk\Exceptions\RaisesAnyException.cs (1)
37 CultureInfo.CurrentCulture,
Sdk\Exceptions\RaisesException.cs (2)
40 CultureInfo.CurrentCulture, 64 CultureInfo.CurrentCulture,
Sdk\Exceptions\SameException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\SingleException.cs (4)
53 CultureInfo.CurrentCulture, 85 CultureInfo.CurrentCulture, 93 CultureInfo.CurrentCulture, 100 CultureInfo.CurrentCulture,
Sdk\Exceptions\SkipException.cs (1)
36 CultureInfo.CurrentCulture,
Sdk\Exceptions\StartsWithException.cs (1)
47 CultureInfo.CurrentCulture,
Sdk\Exceptions\StrictEqualException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\SubsetException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\SupersetException.cs (1)
40 CultureInfo.CurrentCulture,
Sdk\Exceptions\ThrowsAnyException.cs (2)
49 CultureInfo.CurrentCulture, 67 CultureInfo.CurrentCulture,
Sdk\Exceptions\ThrowsException.cs (3)
49 CultureInfo.CurrentCulture, 77 CultureInfo.CurrentCulture, 96 CultureInfo.CurrentCulture,
Sdk\Exceptions\TrueException.cs (1)
45 CultureInfo.CurrentCulture,
Sdk\Exceptions\XunitException.cs (2)
67 : string.Format(CultureInfo.CurrentCulture, "{0}: {1}", className, message); 71 result = string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", result, Environment.NewLine, stackTrace);
TypeAsserts.cs (2)
288 expectedTypeName += string.Format(CultureInfo.CurrentCulture, " (from {0})", expectedType.GetTypeInfo().Assembly.GetName().FullName); 289 actualTypeName += string.Format(CultureInfo.CurrentCulture, " (from {0})", actualType.GetTypeInfo().Assembly.GetName().FullName);