Implemented interface member:
method
ToString
System.IConvertible.ToString(System.IFormatProvider)
71 references to ToString
ClaimsTransformation (1)
ClaimsTransformer.cs (1)
21new Claim("Transformed", DateTime.Now.ToString(CultureInfo.InvariantCulture))
Identity.ExternalClaims (1)
Startup.cs (1)
54tokens.Add(new AuthenticationToken() { Name = "TicketCreated", Value = DateTime.UtcNow.ToString(CultureInfo.InvariantCulture) });
LocalizationSample (2)
Startup.cs (2)
95await context.Response.WriteAsync($"<tr><th>{SR["Current date (invariant):"]}</th><td>{DateTime.Now.ToString(CultureInfo.InvariantCulture)}</td></tr>"); 97await context.Response.WriteAsync($"<tr><th>{SR["Current date (request):"]}</th><td>{DateTime.Now.ToString(CultureInfo.CurrentCulture)}</td></tr>");
Microsoft.AspNetCore.Authentication.JwtBearer (4)
JwtBearerHandler.cs (4)
393+ $"'{stil.NotBefore?.ToString(CultureInfo.InvariantCulture) ?? "(null)"}'" 394+ $", Expires: '{stil.Expires?.ToString(CultureInfo.InvariantCulture) ?? "(null)"}'", 395SecurityTokenNotYetValidException stnyv => $"The token is not valid before '{stnyv.NotBefore.ToString(CultureInfo.InvariantCulture)}'", 396SecurityTokenExpiredException ste => $"The token expired at '{ste.Expires.ToString(CultureInfo.InvariantCulture)}'",
Microsoft.AspNetCore.Authentication.Test (2)
JwtBearerTests.cs (1)
1008var max = DateTime.Parse(DateTime.MaxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
JwtBearerTests_Handler.cs (1)
951var max = DateTime.Parse(DateTime.MaxValue.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Components (6)
BindConverter.cs (4)
347return value.ToString(culture ?? CultureInfo.CurrentCulture); 352return value.ToString(culture ?? CultureInfo.CurrentCulture); 390return value.Value.ToString(culture ?? CultureInfo.CurrentCulture); 400return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
NavigationManagerExtensions.cs (2)
51=> value.ToString(CultureInfo.InvariantCulture); 54=> value?.ToString(CultureInfo.InvariantCulture);
Microsoft.AspNetCore.Components.Tests (5)
BindConverterTest.cs (1)
162var expected = value.ToString(CultureInfo.CurrentCulture);
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), });
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
AntiforgeryMiddlewareTest.cs (5)
47new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 88new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 131new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 163new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 195new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (2)
184{ key, value.ToString(CultureInfo.InvariantCulture) } 193Assert.Equal(value.ToString(CultureInfo.InvariantCulture), roundTripValue);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Infrastructure\TempDataSerializerTestBase.cs (2)
184{ key, value.ToString(CultureInfo.InvariantCulture) } 193Assert.Equal(value.ToString(CultureInfo.InvariantCulture), roundTripValue);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
133if (!await cache.StringSetAsync(gcKey, DateTime.UtcNow.ToString(CultureInfo.InvariantCulture), gcLifetime, when: When.NotExists).ConfigureAwait(false))
Microsoft.AspNetCore.Routing.FunctionalTests (15)
MinimalFormTests.cs (15)
60new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 120new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 165new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 204new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 281new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 328new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 424new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 481new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 542new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 543new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 594new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 595new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 646new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 647new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 693new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)),
Microsoft.Build.Engine.UnitTests (1)
Evaluation\Expander_Tests.cs (1)
40private string _dateToParse = new DateTime(2010, 12, 25).ToString(CultureInfo.CurrentCulture);
Microsoft.CodeAnalysis (1)
ConstantValue.cs (1)
832ConstantValueTypeDiscriminator.DateTime => DateTimeValue.ToString(provider),
Microsoft.Data.Analysis (1)
DataFrame.IO.cs (1)
723record.Append(((DateTime)value).ToString(cultureInfo));
Microsoft.Data.Analysis.Tests (2)
DataFrame.IOTests.cs (2)
1106Assert.Equal(dateColumn[0].Value.ToString(cultureInfo), text[0]); 1107Assert.Equal(dateColumn[1].Value.ToString(cultureInfo), text[1]);
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Logging\FakeLoggerTests.cs (2)
130Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), (string)logger.LatestRecord.State!); 138Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), logger.LatestRecord.StructuredState![0].Value!);
Microsoft.Gen.Logging.Generated.Tests (5)
LogMethodTests.cs (2)
834Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), collector.LatestRecord.StructuredState!.GetValue("p0")); 835Assert.Equal("M0 " + dt.ToString(CultureInfo.InvariantCulture), collector.LatestRecord.Message);
LogPropertiesTests.cs (3)
125Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P0")); 237["classToLog.GetOnlyProperty"] = classToLog.GetOnlyProperty.ToString(CultureInfo.InvariantCulture), 248= classToLog.TransitiveProperty.InnerTransitiveProperty.DateTimeProperty.ToString(CultureInfo.InvariantCulture),
Microsoft.VisualStudio.LanguageServices (1)
Telemetry\FileLogger.cs (1)
50=> DateTime.Now.ToString(CultureInfo.InvariantCulture).Replace(' ', '_').Replace('/', '_').Replace(':', '_') + ".log";
PresentationFramework (2)
System\Windows\Controls\Calendar.cs (1)
766return this.SelectedDate.Value.ToString(DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)));
System\Windows\Controls\DatePicker.cs (1)
743return this.SelectedDate.Value.ToString(DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)));
System.ComponentModel.TypeConverter (1)
System\ComponentModel\DateTimeConverter.cs (1)
103return dt.ToString(culture);
System.Data.Common (2)
System\Data\Common\SQLConvert.cs (1)
462return ((DateTime)value).ToString(formatProvider);
System\Data\SQLTypes\SQLDateTime.cs (1)
338return dateTime.ToString((IFormatProvider)null!);
System.Net.Requests (1)
System\Net\Cache\HttpRequestCachePolicy.cs (1)
99(CacheSyncDate == DateTime.MinValue ? string.Empty : " CacheSyncDate:" + CacheSyncDate.ToString(CultureInfo.CurrentCulture));
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2029return value.ToString(provider);
System.Private.Xml (1)
System\Xml\Xsl\IlGen\XmlILTrace.cs (1)
114w.WriteAttributeString("timestamp", DateTime.Now.ToString(CultureInfo.InvariantCulture));
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
756return date.ToString(culture);
System.Xaml.Tests (2)
System\Windows\Markup\DateTimeValueSerializerTests.cs (1)
67yield return new object[] { date.ToString(CultureInfo.InvariantCulture), date };
System\Xaml\Replacements\DateTimeConverter2Tests.cs (1)
33yield return new object[] { date.ToString(CultureInfo.InvariantCulture), date };
xunit.console (1)
ConsoleRunner.cs (1)
306assembliesElement.Add(new XAttribute("timestamp", DateTime.Now.ToString(CultureInfo.InvariantCulture)));