57 writes to CurrentCulture
Aspire.Hosting.Tests (2)
Utils\StringComparersTests.cs (2)
29CultureInfo.CurrentCulture = new CultureInfo("en-AU"); 40CultureInfo.CurrentCulture = currentCulture;
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
32CultureInfo.CurrentCulture = culture;
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
32CultureInfo.CurrentCulture = culture;
Microsoft.AspNetCore.Components.Tests (3)
Rendering\RendererSynchronizationContextTest.cs (3)
110CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 270CultureInfo.CurrentCulture = new CultureInfo("en-GB"); 378CultureInfo.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.Build (10)
BackEnd\BuildManager\BuildManager.cs (2)
1587CultureInfo.CurrentCulture = _buildParameters.Culture; 1608CultureInfo.CurrentCulture = oldCulture;
BackEnd\Components\Communications\NodeEndpointInProc.cs (1)
363CultureInfo.CurrentCulture = culture;
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
380CultureInfo.CurrentCulture = culture;
BackEnd\Components\Logging\LoggingService.cs (2)
1495CultureInfo.CurrentCulture = _componentHost.BuildParameters.Culture; 1523CultureInfo.CurrentCulture = originalCultureInfo;
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
720CultureInfo.CurrentCulture = _componentHost.BuildParameters.Culture; 975CultureInfo.CurrentCulture = savedCulture;
BackEnd\Node\InProcNode.cs (1)
461CultureInfo.CurrentCulture = configuration.BuildParameters.Culture;
BackEnd\Node\OutOfProcNode.cs (1)
745CultureInfo.CurrentCulture = _buildParameters.Culture;
Microsoft.Build.CommandLine.UnitTests (1)
XMake_Tests.cs (1)
935CultureInfo.CurrentCulture = originalUICulture;
Microsoft.Build.Engine.UnitTests (3)
Evaluation\ExpanderFunction_Tests.cs (1)
278CultureInfo.CurrentCulture = originalCulture;
NodeStatus_SizeChange_Tests.cs (2)
31CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; 70CultureInfo.CurrentCulture = _currentCulture;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
LexicalAndXml\LexicalTests.cs (2)
3757CultureInfo.CurrentCulture = (CultureInfo)oldCulture.Clone(); 3769CultureInfo.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)
97CultureInfo.CurrentCulture = CultureInfo.InvariantCulture 100CultureInfo.CurrentCulture = New CultureInfo("cs-CZ", useUserOverride:=False) 104CultureInfo.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)
107CultureInfo.CurrentCulture = _culture; 309CultureInfo.CurrentCulture = value;
System.Private.Windows.Core.TestUtilities (2)
ThreadCultureChange.cs (2)
31CultureInfo.CurrentCulture = newCulture; 43CultureInfo.CurrentCulture = _originalCulture;
1471 references to CurrentCulture
Aspire.Dashboard (10)
Components\Controls\Chart\ChartBase.cs (1)
200return $"<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\Resources.razor.cs (1)
561tooltipBuilder.Append(CultureInfo.CurrentCulture, $" + {displayedEndpoints.Count - maxShownEndpoints}");
Model\DefaultInstrumentUnitResolver.cs (1)
53value = value.ToLower(CultureInfo.CurrentCulture);
Model\ResourceViewModel.cs (1)
306value = FormatHelpers.FormatDateTime(timeProvider, date, cultureInfo: CultureInfo.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)
12/// <see cref="Thread.CurrentThread" /> <see cref="CultureInfo.CurrentCulture" /> and 62/// <see cref="CultureInfo.CurrentCulture" /> and <see cref="CultureInfo.CurrentUICulture" /> 74CultureInfo.CurrentCulture.ClearCachedData(); 79/// Restores the original <see cref="CultureInfo.CurrentCulture" /> and 88CultureInfo.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 (1)
tests\Shared\WorkloadTesting\TestOutputWrapper.cs (1)
26messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
Aspire.Hosting.NodeJs.Tests (1)
NodeAppFixture.cs (1)
125messageSink.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
Aspire.Hosting.Tests (1)
Utils\StringComparersTests.cs (1)
20var currentCulture = CultureInfo.CurrentCulture;
Aspire.Workload.Tests (1)
tests\Shared\WorkloadTesting\TestOutputWrapper.cs (1)
26messageSink?.OnMessage(new DiagnosticMessage(string.Format(CultureInfo.CurrentCulture, format, args)));
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)
346throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, workingDirectory)); 351var moreThanOneProjectMsg = string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneProjectFoundFormat, workingDirectory); 355var useProjectOptions = string.Format(CultureInfo.CurrentCulture, SR.UseProjectFileOptionOnMultipleFilesMsgFormat, Switches.ProjectFile.Name, projectItems); 440throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileAlreadyExistsFormat, filePath, Switches.OutputFile.Name)); 447string.Format(CultureInfo.CurrentCulture, SR.ErrOutputFileNotUnderOutputDirFormat, Switches.OutputFile.Name, outputFile, this.OutputDir, Switches.OutputDirectory.Name)); 453this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnSpecifiedFilePathNotUndeProjectDirFormat, Switches.OutputFile.Name, outputFile, this.Project.DirectoryPath)); 473throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidOperationNoProjectFileFoundUnderFolderFormat, Directory.GetCurrentDirectory())); 477throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrProjectToUpdateNotFoundFormat, Switches.Update.Name, Switches.ProjectFile.Name)); 508throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath)); 516throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrMoreThanOneUpdateParamsFilesFoundFormat, this.Project.FullPath, Switches.Update.Name, svcRefNames)); 530throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrServiceReferenceNotFoundUnderProjectFormat, this.UpdateServiceReferenceFolder, this.Project.FullPath)); 538throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrNoUpdateParamsFileFoundFormat, this.Project.FullPath)); 662throw new ToolArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ErrInvalidNamespaceFormat, 673this.Project.EndOfLifeTargetFrameworks?.ToList().ForEach(tfx => this.AddWarning(string.Format(CultureInfo.CurrentCulture, SR.WrnOutOfSupportTargetFrameworkFormat, tfx))); 679this.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);
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.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)
138capturedCulture = CultureInfo.CurrentCulture; 154Assert.Same(CultureInfo.CurrentCulture, capturedCulture); 280capturedCulture = CultureInfo.CurrentCulture; 287Assert.Same(CultureInfo.CurrentCulture, capturedCulture); 388capturedCulture = CultureInfo.CurrentCulture; 396Assert.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)
327throw 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)
98: 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 (53)
BackEnd\BuildManager\BuildManager.cs (4)
792: CultureInfo.CurrentCulture; 1580var oldCulture = CultureInfo.CurrentCulture; 1585if (!Equals(CultureInfo.CurrentCulture, _buildParameters!.Culture)) 1606if (!Equals(CultureInfo.CurrentCulture, oldCulture))
BackEnd\BuildManager\BuildParameters.cs (1)
112private CultureInfo _culture = CultureInfo.CurrentCulture;
BackEnd\BuildManager\BuildSubmission.cs (1)
123ThreadPoolExtensions.QueueThreadPoolWorkItemWithCulture(Callback, CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture);
BackEnd\Client\MSBuildClient.cs (1)
531CultureInfo.CurrentCulture,
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
1433using (StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, @"EngineTrace_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true)) 1435string message = String.Format(CultureInfo.CurrentCulture, format, stuff);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
385_inProcNodeThread.Name = String.Format(CultureInfo.CurrentCulture, "In-proc Node ({0})", _componentHost.Name);
BackEnd\Components\Logging\LoggingService.cs (1)
1493originalCultureInfo = CultureInfo.CurrentCulture;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
249sb.Append((string)Convert.ChangeType(parameterValue, typeof(string), CultureInfo.CurrentCulture));
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
970CultureInfo savedCulture = CultureInfo.CurrentCulture;
BackEnd\Components\Scheduler\Scheduler.cs (4)
2569using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true); 2593using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true); 2707using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true); 2747using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
BackEnd\Components\Scheduler\ScheduleResponse.cs (7)
240return String.Format(CultureInfo.CurrentCulture, "Act: {0} Node: {1} Request: {2}", Action, NodeId, Unblocker.BlockedRequestId); 243return String.Format(CultureInfo.CurrentCulture, "Act: {0} Node: {1} Request: {2} Parent {3}", Action, NodeId, BuildRequest.GlobalRequestId, BuildRequest.ParentGlobalRequestId); 246return String.Format(CultureInfo.CurrentCulture, "Act: {0} Node: {1} Request: {2} Parent {3} Configuration: {4}", Action, NodeId, BuildRequest.GlobalRequestId, BuildRequest.ParentGlobalRequestId, BuildRequest.ConfigurationId); 249return String.Format(CultureInfo.CurrentCulture, "Act: {0} Node: {1} Request: {2} Parent {3} Configuration: {4}", Action, NodeId, BuildRequest.GlobalRequestId, BuildRequest.ParentGlobalRequestId, BuildRequest.ConfigurationId); 252return String.Format(CultureInfo.CurrentCulture, "Act: {0} Submission: {1}", Action, BuildResult.SubmissionId); 255return String.Format(CultureInfo.CurrentCulture, "Act: {0} Count: {1}", Action, NumberOfNodesToCreate); 259return String.Format(CultureInfo.CurrentCulture, "Act: {0}", Action);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
872return String.Format(CultureInfo.CurrentCulture, "{0} {1} {2} {3}", _configId, _projectFullPath, _toolsVersion, _globalProperties);
CommunicationsUtilities.cs (2)
788string message = string.Format(CultureInfo.CurrentCulture, format, args); 835string.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), EnvironmentUtilities.CurrentProcessId, nodeId), append: true))
ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
Evaluation\Evaluator.cs (1)
1142SetBuiltInProperty(ReservedPropertyNames.buildNodeCount, _maxNodeCount.ToString(CultureInfo.CurrentCulture));
Evaluation\ProjectXmlChangedEventArgs.cs (1)
56get { return _unformattedReason != null ? String.Format(CultureInfo.CurrentCulture, _unformattedReason, _formattingParameter) : null; }
EventArgsFormatting.cs (1)
354CultureInfo.CurrentCulture, finalFormat,
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
Logging\BaseConsoleLogger.cs (5)
521WritePretty(String.Format(CultureInfo.CurrentCulture, "{0,-30} = ", entry.Key)); 539WritePretty(String.Format(CultureInfo.CurrentCulture, "{0,-30} = ", prop.Key)); 811time = String.Format(CultureInfo.CurrentCulture, 824String.Format(CultureInfo.CurrentCulture, "{0,-40}" /* pad to 40 align left */, scopeName), 825String.Format(CultureInfo.CurrentCulture, "{0,3}", calls));
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
759string argument = Convert.ToString(arguments[i], CultureInfo.CurrentCulture);
Logging\LogFormatter.cs (1)
41return timeStamp.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture);
Logging\ParallelLogger\ParallelConsoleLogger.cs (5)
763string propertyString = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", prop.Key, EscapingUtilities.UnescapeAll((string)(prop.Value))); 784string environmentMessage = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", entry.Key, entry.Value); 1759string time = String.Format(CultureInfo.CurrentCulture, 1766String.Format(CultureInfo.CurrentCulture, "{0,-40}" /* pad to 40 align left */, scopeName), 1767String.Format(CultureInfo.CurrentCulture, "{0,3}", calls));
Logging\TerminalLogger\TerminalLogger.cs (1)
488Terminal.WriteLine(string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator + " ", summaryAndTotalText, failedText, passedText, skippedText, durationText));
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
TaskHostConfiguration.cs (1)
39private CultureInfo _culture = CultureInfo.CurrentCulture;
ThreadPoolExtensions.cs (3)
26CultureInfo originalThreadCulture = CultureInfo.CurrentCulture; 30if (CultureInfo.CurrentCulture != culture) 45if (CultureInfo.CurrentCulture != originalThreadCulture)
Microsoft.Build.Engine.OM.UnitTests (6)
ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
Microsoft.Build.Engine.UnitTests (14)
BackEnd\BinaryTranslator_Tests.cs (1)
266System.Globalization.CultureInfo.CurrentCulture);
ConsoleLogger_Tests.cs (8)
1432prop1 = String.Format(CultureInfo.CurrentCulture, "{0,-30} = {1}", "prop1", "val1"); 1433prop2 = String.Format(CultureInfo.CurrentCulture, "{0,-30} = {1}", "prop2", "val2"); 1434prop3 = String.Format(CultureInfo.CurrentCulture, "{0,-30} = {1}", "pro(p3)", "va;%3b;l3"); 1441prop1 = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", "prop1", "val1"); 1442prop2 = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", "prop2", "val2"); 1443prop3 = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", "pro(p3)", "va;%3b;l3"); 1637message = String.Format(CultureInfo.CurrentCulture, "{0} = {1}", kvp.Key, kvp.Value); 1641message = String.Format(CultureInfo.CurrentCulture, "{0,-30} = {1}", kvp.Key, kvp.Value);
Evaluation\Expander_Tests.cs (1)
40private string _dateToParse = new DateTime(2010, 12, 25).ToString(CultureInfo.CurrentCulture);
LogFormatter_Tests.cs (3)
50Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result); 54Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result); 58Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result);
NodeStatus_SizeChange_Tests.cs (1)
30_currentCulture = CultureInfo.CurrentCulture;
Microsoft.Build.Framework (2)
LazyFormattedBuildEventArgs.cs (1)
123argValue = Convert.ToString(argument, CultureInfo.CurrentCulture) ?? "";
Traits.cs (1)
591formatted = String.Format(CultureInfo.CurrentCulture, unformatted, args);
Microsoft.Build.Framework.UnitTests (4)
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
Microsoft.Build.Tasks.CodeAnalysis (2)
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.Core (66)
AssemblyDependency\AssemblyInformation.cs (1)
469throw new BadImageFormatException(string.Format(CultureInfo.CurrentCulture,
BootstrapperUtil\BootstrapperBuilder.cs (4)
951Debug.Assert(langNode != null, string.Format(CultureInfo.CurrentCulture, "Unable to find a package node in {0}", strLangManifestFilename)); 1043Debug.WriteLine(String.Format(CultureInfo.CurrentCulture, "Validation results already added for Product Code '{0}'", productCodeAttribute)); 1550DumpXmlToFile(node, string.Format(CultureInfo.CurrentCulture, "{0}.{1}.xml", package.Product.ProductCode, package.Culture)); 1986Debug.Assert(s != null, String.Format(CultureInfo.CurrentCulture, "EmbeddedResource '{0}' not found", name));
BootstrapperUtil\Product.cs (1)
171Debug.WriteLine(String.Format(CultureInfo.CurrentCulture, "A package with culture '{0}' has already been added to product '{1}'", package.Culture.ToLowerInvariant(), ProductCode));
ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
GenerateApplicationManifest.cs (2)
244Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateApplicationManifest.AddIsolatedComReferences t={0}", Environment.TickCount - t1)); 329Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateApplicationManifest.AddClickOnceFiles t={0}", Environment.TickCount - t1));
GenerateManifestBase.cs (3)
522Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifestBase.ResolveFiles t={0}", Environment.TickCount - t1)); 628Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifestBase.WriteManifest t={0}", Environment.TickCount - t1)); 629Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "Total time to generate manifest '{1}': t={0}", Environment.TickCount - _startTime, Path.GetFileName(OutputManifest.ItemSpec)));
GenerateResource.cs (1)
3698ch = (char)UInt16.Parse(new String(hex), NumberStyles.HexNumber, CultureInfo.CurrentCulture);
ManifestUtil\ApplicationManifest.cs (5)
511Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifest.CheckForComDuplicates t={0}", Environment.TickCount - t1)); 659OutputMessages.AddWarningMessage("GenerateManifest.TargetPathTooLong", assembly.ToString(), _maxTargetPath.ToString(CultureInfo.CurrentCulture)); 679OutputMessages.AddWarningMessage("GenerateManifest.TargetPathTooLong", assembly.AssemblyIdentity.Name, _maxTargetPath.ToString(CultureInfo.CurrentCulture)); 705OutputMessages.AddWarningMessage("GenerateManifest.TargetPathTooLong", file.TargetPath, _maxTargetPath.ToString(CultureInfo.CurrentCulture)); 721Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifest.CheckManifestReferences t={0}", Environment.TickCount - t1));
ManifestUtil\ComImporter.cs (5)
139_outputMessages.AddWarningMessage("GenerateManifest.ComImport", _outputDisplayName, String.Format(CultureInfo.CurrentCulture, _resources.GetString("ComImporter.SubKeyNotImported"), key.Name + "\\" + name)); 161_outputMessages.AddWarningMessage("GenerateManifest.ComImport", _outputDisplayName, String.Format(CultureInfo.CurrentCulture, _resources.GetString("ComImporter.ValueNotImported"), key.Name + "\\@" + name)); 243_outputMessages.AddWarningMessage("GenerateManifest.ComImport", _outputDisplayName, String.Format(CultureInfo.CurrentCulture, _resources.GetString("ComImporter.LocalServerNotSupported"), classKey.Name + "\\LocalServer32")); 254_outputMessages.AddWarningMessage("GenerateManifest.ComImport", _outputDisplayName, String.Format(CultureInfo.CurrentCulture, _resources.GetString("ComImporter.SubKeyNotImported"), classKey.Name + "\\" + subKeyName)); 261_outputMessages.AddErrorMessage("GenerateManifest.ComImport", _outputDisplayName, String.Format(CultureInfo.CurrentCulture, _resources.GetString("ComImporter.MissingValue"), classKey.Name + "\\InProcServer32", "(Default)"));
ManifestUtil\ConvertUtil.cs (2)
29Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Invalid value '{0}' for {1}, returning {2}", value, typeof(bool).Name, defaultValue.ToString())); 33Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Invalid value '{0}' for {1}, returning {2}", value, typeof(bool).Name, defaultValue.ToString()));
ManifestUtil\EmbeddedManifestReader.cs (1)
77Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "EmbeddedManifestReader.Read t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestFormatter.cs (1)
100Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.Format t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestReader.cs (1)
249Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestReader.Deserialize t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestWriter.cs (2)
31Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.Serialize t={0}", Environment.TickCount - t1)); 191Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.WriteManifest t={0}", Environment.TickCount - t1));
ManifestUtil\OutputMessage.cs (2)
99taskText = String.Format(CultureInfo.CurrentCulture, taskText, arguments); 110taskText = String.Format(CultureInfo.CurrentCulture, taskText, arguments);
ManifestUtil\PathUtil.cs (1)
118return String.Compare(CanonicalizePath(path1), CanonicalizePath(path2), true, System.Globalization.CultureInfo.CurrentCulture) == 0;
ManifestUtil\SecurityUtil.cs (1)
878throw new ApplicationException(String.Format(CultureInfo.CurrentCulture,
ManifestUtil\TrustInfo.cs (1)
793Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.WriteTrustInfo t={0}", Environment.TickCount - t1));
ManifestUtil\Util.cs (1)
220Debug.Assert(s != null, String.Format(CultureInfo.CurrentCulture, "EmbeddedResource '{0}' not found", name));
ManifestUtil\XmlUtil.cs (7)
85Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "new XPathDocument(1) t={0}", Environment.TickCount - t2)); 92Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform.Load t={0}", Environment.TickCount - t3)); 102Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "new XmlReader(2) t={0}", Environment.TickCount - t4)); 113Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "arg: key='{0}' value='{1}'", key, val.ToString())); 125Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform.Transform t={0}", Environment.TickCount - t4)); 131Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform(\"{0}\") t={1}", resource, Environment.TickCount - t1)); 194Debug.Fail(String.Format(CultureInfo.CurrentCulture, "ResourceResolver could not find file '{0}'", filename));
ResolveManifestFiles.cs (12)
349Debug.Assert(!String.IsNullOrEmpty(itemCulture), String.Format(CultureInfo.CurrentCulture, "Satellite item '{0}' is missing expected attribute '{1}'", item.ItemSpec, "Culture")); 865Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key)); 924Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same key '{0}' detected", key)); 965Debug.Assert(!_dictionary.ContainsKey(key), String.Format(CultureInfo.CurrentCulture, "Two or more items with same '{0}' attribute detected", ItemMetadataNames.targetPath)); 1000Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Invalid value '{0}' for {1}", value, "PublishState")); 1004Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Invalid value '{0}' for {1}", value, "PublishState")); 1039Debug.Fail(String.Format(CultureInfo.CurrentCulture, "PublishState.DataFile is invalid for an assembly")); 1046Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Unhandled value PublishFlags.{0}", state.ToString())); 1076Debug.Fail(String.Format(CultureInfo.CurrentCulture, "PublishState.Prerequisite is invalid for a file")); 1079Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Unhandled value PublishFlags.{0}", state.ToString())); 1106Debug.Fail(String.Format(CultureInfo.CurrentCulture, "PublishState.DataFile is invalid for an assembly")); 1113Debug.Fail(String.Format(CultureInfo.CurrentCulture, "Unhandled value PublishFlags.{0}", state.ToString()));
ResolveSDKReference.cs (3)
412listOfIncompatibleReferences.Add(String.Format(CultureInfo.CurrentCulture, "\"{0}\"", incompatibleReference.SDKName)); 441listOfIncompatibleReferences.Add(String.Format(CultureInfo.CurrentCulture, "\"{0}\"", incompatibleReference.SDKName)); 536.Select(y => String.Format(CultureInfo.CurrentCulture, "\"{0}\"", y))
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
257using (StringWriter writer = new StringWriter(new StringBuilder(), CultureInfo.CurrentCulture))
System.Design.cs (1)
147return String.Format(CultureInfo.CurrentCulture, res, args);
WriteCodeFragment.cs (1)
275using (var writer = new StringWriter(generatedCode, CultureInfo.CurrentCulture))
Microsoft.Build.Utilities.Core (7)
ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
EventArgsFormatting.cs (1)
354CultureInfo.CurrentCulture, finalFormat,
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
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)
593if (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)
3754var oldCulture = CultureInfo.CurrentCulture; 3758CultureInfo.CurrentCulture.NumberFormat.NegativeSign = "~"; 3759CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator = ",";
Syntax\SyntaxFactoryTests.cs (1)
370var culture = CultureInfo.CurrentCulture;
Microsoft.CodeAnalysis.EditorFeatures (3)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
605return 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)
46builder.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.Scripting (2)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
61gacFileResolver: 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)
95Dim currentCulture = CultureInfo.CurrentCulture
Microsoft.CodeAnalysis.Workspaces (1)
PatternMatching\PatternMatcher.cs (1)
53culture ??= 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.DotNet.VersionTools (2)
Automation\NupkgInfoFactory.cs (2)
48throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Did not extract nuspec file from package: {0}", path)); 52throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid package: {0}", path), ex);
Microsoft.Extensions.AI.Evaluation.Reporting (11)
Storage\DiskBasedResponseCache.CacheEntry.cs (2)
45string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheEntryFilePath)); 62string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheEntryFilePath));
Storage\DiskBasedResponseCache.CacheOptions.cs (2)
50string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheOptionsFilePath)); 67string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, cacheOptionsFilePath));
Storage\DiskBasedResponseCache.cs (6)
88CultureInfo.CurrentCulture, 122CultureInfo.CurrentCulture, 202CultureInfo.CurrentCulture, 225CultureInfo.CurrentCulture, 395? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 396: 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)
136CultureInfo.CurrentCulture, 158CultureInfo.CurrentCulture, 294? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 295: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath)); 317? string.Format(CultureInfo.CurrentCulture, EntryFileNotFound, entryFilePath) 318: string.Format(CultureInfo.CurrentCulture, ContentsFileNotFound, contentsFilePath));
Storage\AzureStorageResultStore.cs (1)
125string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, fileClient.Name));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Linux\LinuxUtilizationParserCgroupV2.cs (1)
519string quotaString = quota.ToString(CultureInfo.CurrentCulture);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Linux\LinuxUtilizationParserCgroupV1Tests.cs (1)
128{ new FileInfo("/sys/fs/cgroup/memory/memory.usage_in_bytes"), total.ToString(CultureInfo.CurrentCulture) }
Linux\LinuxUtilizationParserCgroupV2Tests.cs (1)
193{ 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);
MSBuild (16)
CommunicationsUtilities.cs (2)
788string message = string.Format(CultureInfo.CurrentCulture, format, args); 835string.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), EnvironmentUtilities.CurrentProcessId, nodeId), append: true))
ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
EventArgsFormatting.cs (1)
354CultureInfo.CurrentCulture, finalFormat,
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), EnvironmentUtilities.CurrentProcessId))
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
TaskHostConfiguration.cs (1)
39private CultureInfo _culture = CultureInfo.CurrentCulture;
ThreadPoolExtensions.cs (3)
26CultureInfo originalThreadCulture = CultureInfo.CurrentCulture; 30if (CultureInfo.CurrentCulture != culture) 45if (CultureInfo.CurrentCulture != originalThreadCulture)
XMake.cs (2)
546string valueString = string.Format(CultureInfo.CurrentCulture, valueFormat, value); 1215ThreadPoolExtensions.QueueThreadPoolWorkItemWithCulture(callback, CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture);
MSBuildTaskHost (12)
BinaryTranslator.cs (1)
459return TryLoadCulture(cultureName, out cultureInfo) ? cultureInfo : CultureInfo.CurrentCulture;
CommunicationsUtilities.cs (2)
788string message = string.Format(CultureInfo.CurrentCulture, format, args); 835string.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), EnvironmentUtilities.CurrentProcessId, nodeId), append: true))
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (1)
33Trace.WriteLine(String.Format(CultureInfo.CurrentCulture, formatstring, parameters), category);
ExceptionHandling.cs (1)
369writer.WriteLine(DateTime.Now.ToString("G", CultureInfo.CurrentCulture));
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), EnvironmentUtilities.CurrentProcessId))
ResourceUtilities.cs (4)
378formatted = string.Format(CultureInfo.CurrentCulture, unformatted, args); 395return string.Format(CultureInfo.CurrentCulture, unformatted, arg1); 408return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2); 422return string.Format(CultureInfo.CurrentCulture, unformatted, arg1, arg2, arg3);
TaskHostConfiguration.cs (1)
39private CultureInfo _culture = CultureInfo.CurrentCulture;
Traits.cs (1)
591formatted = String.Format(CultureInfo.CurrentCulture, unformatted, args);
PresentationBuildTasks (16)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (1)
2280(i + 1).ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (3)
1318numberOfConstructorAttributes.ToString(CultureInfo.CurrentCulture), 1738lineNumber.ToString(CultureInfo.CurrentCulture), 1739linePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (6)
234lineNumber.ToString(CultureInfo.CurrentCulture), 235linePosition.ToString(CultureInfo.CurrentCulture))}"; 891xamlDefAttributeNode.LineNumber.ToString(CultureInfo.CurrentCulture), 892xamlDefAttributeNode.LinePosition.ToString(CultureInfo.CurrentCulture)); 1351lineNumber.ToString(CultureInfo.CurrentCulture), 1352linePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (4)
1387lineNumber.ToString(CultureInfo.CurrentCulture), 1388linePosition.ToString(CultureInfo.CurrentCulture)); 1411LineNumber.ToString(CultureInfo.CurrentCulture), 1412LinePosition.ToString(CultureInfo.CurrentCulture));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (2)
693lineNumber.ToString(CultureInfo.CurrentCulture), 694linePosition.ToString(CultureInfo.CurrentCulture));
PresentationCore (7)
MS\Internal\TextFormatting\LineServicesCallbacks.cs (1)
1547return CultureInfo.CurrentCulture;
MS\Internal\TextFormatting\NumberSubstitution.cs (1)
133return CultureInfo.CurrentCulture;
System\Windows\Input\Stylus\Common\StylusButton.cs (1)
102return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Common\StylusDevice.cs (1)
164return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Common\TabletDeviceBase.cs (1)
181return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), Name);
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (1)
1089return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), this.Name);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (1)
163return String.Format(CultureInfo.CurrentCulture, "{0}({1})", base.ToString(), Name);
PresentationFramework (37)
MS\Internal\Data\CollectionViewGroupRoot.cs (1)
671nameStr = nameStr.ToUpper(CultureInfo.CurrentCulture);
MS\Internal\Data\SortFieldComparer.cs (1)
37: (culture == CultureInfo.CurrentCulture) ? Comparer.Default
MS\Internal\Documents\DocumentViewerHelper.cs (2)
263cultureInfo = CultureInfo.CurrentCulture; 281messageString = String.Format(System.Globalization.CultureInfo.CurrentCulture, messageString, findToolBar.SearchText);
System\Windows\Controls\DataGridClipboardHelper.cs (2)
25FormatPlainText(cellValue.ToString(), csv, new StringWriter(sb, CultureInfo.CurrentCulture), ref escapeApplied); 54FormatPlainTextAsHtml(cellValue.ToString(), new StringWriter(sb, CultureInfo.CurrentCulture));
System\Windows\Controls\DatePicker.cs (2)
1288this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.DatePicker_WatermarkText, dtfi.LongDatePattern.ToString()); 1294this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.DatePicker_WatermarkText, dtfi.ShortDatePattern.ToString());
System\Windows\Controls\DateTimeHelper.cs (2)
105return GetDateFormat(CultureInfo.CurrentCulture); 118culture = CultureInfo.CurrentCulture;
System\Windows\Controls\DocumentViewer.cs (2)
1911columnValue = System.Convert.ToInt32((string)data, CultureInfo.CurrentCulture); 2155CultureInfo.CurrentCulture,
System\Windows\Controls\MenuItem.cs (1)
1137return keyGesture.GetDisplayStringForCulture(CultureInfo.CurrentCulture);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1532pageNumber = Convert.ToInt32(args.Parameter, System.Globalization.CultureInfo.CurrentCulture);
System\Windows\Controls\TextRangeAdaptor.cs (1)
1772ITextRange findResult = TextFindEngine.Find(_start, _end, text, findFlags, CultureInfo.CurrentCulture);
System\Windows\Controls\TextSearch.cs (1)
312CompareInfo 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)
37_currentCodePage = CultureInfo.CurrentCulture.TextInfo.ANSICodePage;
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
676throw new XamlParseException(string.Format(CultureInfo.CurrentCulture, SR.Format(SR.UnknownBamlRecord, recordType)));
System\Windows\Markup\BamlReader.cs (3)
462_value = _connectionId.ToString(CultureInfo.CurrentCulture); 659((int)_currentBamlRecord.RecordType).ToString(CultureInfo.CurrentCulture))); 1683((int)_currentBamlRecord.RecordType).ToString(CultureInfo.CurrentCulture)));
System\Windows\Markup\BamlRecordReader.cs (3)
764ThrowException(nameof(SR.ParserUnknownBaml), ((int)bamlRecord.RecordType).ToString(CultureInfo.CurrentCulture)); 1564ThrowException(nameof(SR.ParserBadConstructorParams), elementType.Name, paramCount.ToString(CultureInfo.CurrentCulture)); 1800ThrowException(nameof(SR.ParserUnexpInBAML), keyRecord.RecordType.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\BamlVersionHeader.cs (4)
82(BamlVersion.ReaderVersion.Major.ToString(CultureInfo.CurrentCulture) + "." + 83BamlVersion.ReaderVersion.Minor.ToString(CultureInfo.CurrentCulture)), 84(BamlWriterVersion.Major.ToString(CultureInfo.CurrentCulture) + "." + 85BamlWriterVersion.Minor.ToString(CultureInfo.CurrentCulture))));
System\Windows\Markup\MarkupExtensionParser.cs (2)
1738lineNumber.ToString(CultureInfo.CurrentCulture), 1739linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlParser.cs (2)
1351lineNumber.ToString(CultureInfo.CurrentCulture), 1352linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlStyleSerializer.cs (2)
155lineNumber.ToString(CultureInfo.CurrentCulture), 156linePosition.ToString(CultureInfo.CurrentCulture));
System\Windows\Markup\XamlTypeMapper.cs (2)
693lineNumber.ToString(CultureInfo.CurrentCulture), 694linePosition.ToString(CultureInfo.CurrentCulture));
PresentationUI (31)
MS\Internal\Documents\Application\AddressUtility.cs (2)
48CultureInfo.CurrentCulture, 69CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\Document.cs (1)
315System.Globalization.CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\DocumentPropertiesDialog.cs (3)
166CultureInfo.CurrentCulture, 229CultureInfo.CurrentCulture, 235CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\DocumentStream.cs (2)
818CultureInfo.CurrentCulture, 824generation.ToString(CultureInfo.CurrentCulture)
MS\Internal\Documents\Application\PageTextBox.cs (2)
67if (CultureInfo.CurrentCulture != null) 69this.Text = pageNumber.ToString(CultureInfo.CurrentCulture);
MS\Internal\Documents\Application\Trace.cs (2)
27CultureInfo.CurrentCulture, 45CultureInfo.CurrentCulture,
MS\Internal\Documents\Application\ZoomComboBox.cs (1)
466zoomString = String.Format(CultureInfo.CurrentCulture,
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
1850CultureInfo culture = CultureInfo.CurrentCulture; 1972CultureInfo culture = CultureInfo.CurrentCulture;
MS\Internal\Documents\DocumentSignatureManager.cs (1)
608CultureInfo.CurrentCulture,
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
214String.Format(CultureInfo.CurrentCulture,
MS\Internal\Documents\RightsManagementResourceHelper.cs (3)
76CultureInfo.CurrentCulture, 82CultureInfo.CurrentCulture, 88CultureInfo.CurrentCulture,
MS\Internal\Documents\RMPublishingDialog.cs (1)
467CultureInfo.CurrentCulture,
MS\Internal\Documents\SignatureResourceHelper.cs (6)
209string sigSummary = string.Format(CultureInfo.CurrentCulture, 217certSummary = string.Format(CultureInfo.CurrentCulture, 224result = string.Format(CultureInfo.CurrentCulture, 236result = string.Format(CultureInfo.CurrentCulture, 326CultureInfo.CurrentCulture, 364CultureInfo.CurrentCulture,
MS\Internal\Documents\SigningDialog.cs (1)
169_signerlabel.Text = String.Format(CultureInfo.CurrentCulture,
TenFeetInstallationProgress.xaml.cs (3)
121CurrentBytesText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarKiloBytesStringFormat, (bytesDownloaded / 1024)); 122TotalBytesText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarKiloBytesStringFormat, (bytesTotal / 1024)); 128ProgressBarStatusText.Text = String.Format(CultureInfo.CurrentCulture, SR.ProgressBarPercentageStringFormat, percentDone);
ReachFramework (43)
PrintConfig\DocumentNUp.cs (2)
62return PagesPerSheet.ToString(CultureInfo.CurrentCulture); 557return PagesPerSheet.ToString(CultureInfo.CurrentCulture) + ", " +
PrintConfig\FallbackPTProvider.cs (1)
111CultureInfo.CurrentCulture,
PrintConfig\PageCopyCount.cs (1)
104return Value.ToString(CultureInfo.CurrentCulture);
PrintConfig\PageMediaSize.cs (4)
85return Value.ToString() + ": " + MediaSizeWidth.ToString(CultureInfo.CurrentCulture) + 86" x " + MediaSizeHeight.ToString(CultureInfo.CurrentCulture); 530": MediaSizeWidth=" + MediaSizeWidth.ToString(CultureInfo.CurrentCulture) + 531", MediaSizeHeight=" + MediaSizeHeight.ToString(CultureInfo.CurrentCulture);
PrintConfig\PageResolution.cs (4)
86return ResolutionX.ToString(CultureInfo.CurrentCulture) + " x " + 87ResolutionY.ToString(CultureInfo.CurrentCulture) + " (Qualitative: " + 421return ResolutionX.ToString(CultureInfo.CurrentCulture) + "x" + 422ResolutionY.ToString(CultureInfo.CurrentCulture) +
PrintConfig\PageScaling.cs (3)
550", ScaleWidth=" + CustomScaleWidth.ToString(CultureInfo.CurrentCulture) + 551", ScaleHeight=" + CustomScaleHeight.ToString(CultureInfo.CurrentCulture) + 552", SquareScale=" + CustomSquareScale.ToString(CultureInfo.CurrentCulture);
PrintConfig\PrtCap_Public.cs (2)
458return new FormatException(String.Format(CultureInfo.CurrentCulture, 498throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtCap_Public_Simple.cs (2)
98return String.Format(CultureInfo.CurrentCulture, "({0}, {1}), ({2}, {3})", 163return String.Format(CultureInfo.CurrentCulture, "({0}, {1})",
PrintConfig\PrtCap_Reader.cs (8)
51throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 71throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 85throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 94throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 291throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 319throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 347throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture, 365throw NewPrintCapFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Editor.cs (7)
45throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 59throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 72throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 82throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 106throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 117throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture, 222throw NewPTFormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Public.cs (1)
524return new FormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Public_Simple.cs (5)
111return ((PageMediaSizeName != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", PageMediaSizeName) : "Null") + " (" + 112((Width != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Width) : "Null") + 114((Height != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Height) : "Null") + 219return ((X != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", X) : "Null") + 221((Y != null) ? String.Format(CultureInfo.CurrentCulture, "{0}", Y) : "Null") +
PrintConfig\PTProvider.cs (3)
232throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 337throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 498throw 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, 221writer.Append(ordinal.ToString(CultureInfo.CurrentCulture)); 253writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_ElementPrefix, element.DisplayName); 257writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_OriginFormat, SR.CompositionException_OriginSeparator, element.DisplayName);
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
121return 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; 69culture ??= CultureInfo.CurrentCulture;
System\Drawing\RectangleConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 67culture ??= CultureInfo.CurrentCulture;
System\Drawing\SizeConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 67culture ??= CultureInfo.CurrentCulture;
System\Drawing\SizeFConverter.cs (2)
36culture ??= CultureInfo.CurrentCulture; 66culture ??= 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.Net.Requests (1)
System\Net\Cache\HttpRequestCachePolicy.cs (1)
99(CacheSyncDate == DateTime.MinValue ? string.Empty : " CacheSyncDate:" + CacheSyncDate.ToString(CultureInfo.CurrentCulture));
System.Private.CoreLib (58)
src\libraries\System.Private.CoreLib\src\System\Char.cs (2)
474return CultureInfo.CurrentCulture.TextInfo.ToUpper(c); 503return 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)
6015ManifestError(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)
1073public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1081public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (2)
1083public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1091public readonly string ToString([StringSyntax(StringSyntaxAttribute.NumericFormat)] string? format) => ToString(format, CultureInfo.CurrentCulture);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (2)
1119public override readonly string ToString() => ToString("G", CultureInfo.CurrentCulture); 1127public 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)
300return 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.Security.Cryptography (2)
System\Security\Cryptography\CryptographicUnexpectedOperationException.cs (1)
30: base(string.Format(CultureInfo.CurrentCulture, format, insert))
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
732CultureInfo culture = CultureInfo.CurrentCulture;
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)
84Assert.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)
903CultureInfo 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)
6300char c2 = char.ToUpper(charCode, CultureInfo.CurrentCulture); 6314char c1 = char.ToUpper(text[pos], CultureInfo.CurrentCulture); 6316if (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)
27463throw new ArgumentOutOfRangeException(nameof(width), width, string.Format(SR.DataGridView_SizeTooLarge, (UpperSize).ToString(CultureInfo.CurrentCulture))); 27468throw 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)
221!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)
1041? Convert.ToString(displayValue, CultureInfo.CurrentCulture) 2414throw 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)
3339if (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)
1138private static string FormatDate(DateTime value) => value.ToString("d", CultureInfo.CurrentCulture); 1760throw new ArgumentOutOfRangeException(nameof(x), string.Format(SR.MonthCalendarInvalidDimensions, (x).ToString("D", CultureInfo.CurrentCulture), (y).ToString("D", CultureInfo.CurrentCulture))); 1765throw 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); 2468Culture = CultureInfo.CurrentCulture; 2673return !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)
655cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 668cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 730object ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture); 804ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture);
System\Windows\Forms\DataBinding\BindingNavigator.cs (3)
567_positionItem.Text = position.ToString(CultureInfo.CurrentCulture); 573_countItem.Text = DesignMode ? CountItemFormat : string.Format(CultureInfo.CurrentCulture, CountItemFormat, count); 617newPosition = 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)
17public 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)
1026span[i] = char.ToLower(baseName[i], CultureInfo.CurrentCulture);
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
1609_helpTextCtrl.Text = string.Format(CultureInfo.CurrentCulture, (SR.DesignBindingPickerHelpGenCurrentBinding), _selectedNode.Text); 2354resName = string.Format(CultureInfo.CurrentCulture, "DesignBindingPickerHelpNode{0}{1}{2}", dsType, nodeType, (CanSelect ? "1" : "0")); 2490public 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)
1693c = char.ToUpper(c, CultureInfo.CurrentCulture); 1713? char.ToUpper(c, CultureInfo.CurrentCulture) 1714: char.ToLower(c, CultureInfo.CurrentCulture);
System.Windows.Forms.Design.Tests (3)
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.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)
205System.Globalization.CultureInfo.CurrentCulture, 240return string.Format(CultureInfo.CurrentCulture, format, args);
System\Windows\Input\Manipulations\PointF.cs (1)
149System.Globalization.CultureInfo.CurrentCulture,
System\Windows\Input\Manipulations\VectorD.cs (1)
457return ToString(System.Globalization.CultureInfo.CurrentCulture);
System\Windows\Input\Manipulations\VectorF.cs (1)
441System.Globalization.CultureInfo.CurrentCulture,
System.Xaml (3)
System\Xaml\Replacements\DateTimeOffsetConverter2.cs (2)
42return dtOffset.ToString("O", culture ?? CultureInfo.CurrentCulture); 82return DateTimeOffset.Parse(s.Trim(), culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None);
System\Xaml\XamlServices.cs (1)
131var 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)
1162Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected exception thrown for AccessibleChildren: {0}", e)); 1170Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Unexpected hresult from AccessibleChildren: {0} count is {1} and actualCount is {2}", hr, count, actualCount)); 1374Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "MsaaNativeProvider: IAccessible threw a COMException: {0}", e.Message)); 1391Debug.Assert(false, string.Format(CultureInfo.CurrentCulture, "Unexpected IAccessible exception: {0}", e));
MS\Internal\AutomationProxies\EventManager.cs (1)
120System.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)
152Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} and event/property {1} without matching AdviseEventAdded.", hwnd, key), "NativeMsaaProxy"); 158Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "ERROR: AdviseEventRemoved called for {0} without matching AdviseEventAdded.", hwnd), "NativeMsaaProxy");
MS\Internal\AutomationProxies\NonClientArea.cs (1)
109System.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)
309_sAutomationId = "Octet " + position.ToString(CultureInfo.CurrentCulture); // This string is a non-localizable string 381Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture))); 394return double.Parse(s, CultureInfo.CurrentCulture);
MS\Internal\AutomationProxies\WindowsMenu.cs (5)
2450return string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", sCanonicalsKeyword, menuText.Substring(pos + cKeyChars + 1, cMenuChars - (pos + cKeyChars + 2)), Char.ToUpper(menuText[cMenuChars - 1], CultureInfo.InvariantCulture)); 2481return "F" + iKey.ToString(CultureInfo.CurrentCulture); 2507itemId = "Item " + result.ToString(CultureInfo.CurrentCulture); 2514itemId = "Item " + (_item + 1).ToString(CultureInfo.CurrentCulture); 2858_sAutomationId = "Item " + (item).ToString(CultureInfo.CurrentCulture);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
427_sAutomationId = "StatusBar.Pane" + item.ToString(CultureInfo.CurrentCulture); // This string is a non-localizable string
MS\Internal\AutomationProxies\WindowsToolbar.cs (1)
629itemId = "Item " + tbb.idCommand.ToString(CultureInfo.CurrentCulture);
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
70return 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)
120Debug.WriteLineIf(_traceLayout.TraceInfo, String.Format(CultureInfo.CurrentCulture, "AvalonAdapter({0}): MeasureOverride (constraint={1},result={2})", this.Name, proposedSize, prefSize)); 485string upperKey = Char.ToUpper(charCode, CultureInfo.CurrentCulture).ToString();
System\Windows\Integration\IntegrationExceptionEventArgs.cs (1)
21throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "exception"));
System\Windows\Integration\PropertyMap.cs (5)
83throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "propertyName")); 87throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "translator")); 129throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyMappingExists, propertyName)); 141throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName)); 251throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_ArgumentNullOrEmpty, "propertyName"));
System\Windows\Integration\PropertyMappingExceptionEventArgs.cs (2)
25throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_NullArgument, "exception")); 29throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.WFI_ArgumentNullOrEmpty, "propertyName"));
System\Windows\Integration\WindowsFormsHost.cs (2)
477Debug.WriteLineIf(_traceHandle.TraceVerbose, String.Format(CultureInfo.CurrentCulture, "WindowsFormsHost({0}): BuildWindowCore (parent=0x{1:x8})", this.Name, hwndParent.Handle.ToInt32())); 1033Debug.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)
321 converted = Convert.ChangeType(value, targetType, CultureInfo.CurrentCulture); 444 return EquivalentException.ForCircularReference(string.Format(CultureInfo.CurrentCulture, "{0}.{1}", nameof(expected), prefix)); 447 return EquivalentException.ForCircularReference(string.Format(CultureInfo.CurrentCulture, "{0}.{1}", nameof(actual), prefix)); 539 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)
43 CultureInfo.CurrentCulture,
Sdk\Exceptions\IsTypeException.cs (1)
44 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)
186 expectedTypeName += string.Format(CultureInfo.CurrentCulture, " (from {0})", expectedType.GetTypeInfo().Assembly.GetName().FullName); 187 actualTypeName += string.Format(CultureInfo.CurrentCulture, " (from {0})", actualType.GetTypeInfo().Assembly.GetName().FullName);