61 references to ToString
dotnet-user-jwts (4)
Commands\ListCommand.cs (4)
85table.AddRow(jwt.Id, jwt.Scheme, jwt.Audience, jwt.Issued.ToString("O"), jwt.Expires.ToString("O"), jwt.Token); 89table.AddRow(jwt.Id, jwt.Scheme, jwt.Audience, jwt.Issued.ToString("O"), jwt.Expires.ToString("O"));
Microsoft.Arcade.Common (1)
CompactConsoleLoggerFormatter.cs (1)
69var timestamp = DateTimeOffset.Now.ToString(_options.TimestampFormat);
Microsoft.AspNetCore.CookiePolicy.Test (1)
CookieChunkingTests.cs (1)
43Assert.Equal($"TestCookie={testString}; expires={now.AddMinutes(5).ToString("R")}; max-age=300; domain=foo.com; path=/bar; secure; samesite=strict; httponly", values[0]);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
108context.Request.Headers.ETag = expected.ToString("r");
Microsoft.AspNetCore.Http.Results.Tests (13)
src\Shared\ResultsTests\FileContentResultTestBase.cs (6)
81Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 119Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 159Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 193Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 225Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 255Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (7)
60Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 100Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 142Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 179Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 213Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 245Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 360Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified);
Microsoft.AspNetCore.Mvc.Core.Test (13)
src\Shared\ResultsTests\FileContentResultTestBase.cs (6)
81Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 119Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 159Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 193Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 225Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 255Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (7)
60Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 100Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 142Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 179Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 213Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 245Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 360Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (7)
DateHeaderValueManagerTests.cs (7)
31Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 47Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 49Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 71Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 78Assert.Equal(future.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 96Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 100Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String);
Microsoft.AspNetCore.StaticFiles.Tests (8)
RangeHeaderTests.cs (8)
66req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 83req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.AddHours(-1).ToString("r")); 100req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.ToString("r")); 117req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 172req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 191req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r")); 219req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r")); 246req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
Microsoft.DotNet.ArcadeLogging (1)
MessageBuilder.cs (1)
40public void AddProperty(string name, DateTimeOffset value) => AddProperty(name, value.ToString("O"));
Microsoft.DotNet.XUnitAssert.Tests (1)
Sdk\ArgumentFormatterTests.cs (1)
180 Assert.Equal(now.ToString("o"), ArgumentFormatter.Format(now));
Microsoft.Extensions.Logging.Console (3)
JsonConsoleFormatter.cs (1)
69writer.WriteString("Timestamp", stamp.ToString(timestampFormat));
SimpleConsoleFormatter.cs (1)
78timestamp = stamp.ToString(timestampFormat);
SystemdConsoleFormatter.cs (1)
75textWriter.Write(stamp.ToString(timestampFormat));
Microsoft.Net.Http.Headers.Tests (1)
HeaderUtilitiesTest.cs (1)
17var formatted = dateTime.ToString(Rfc1123Format);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DiagLinkedList.cs (1)
192vsb.Append(ae.Timestamp.ToString("o"));
System.Net.Http (3)
System\Net\Http\Headers\DateHeaderParser.cs (1)
24return ((DateTimeOffset)value).ToString("r");
System\Net\Http\Headers\RangeConditionHeaderValue.cs (1)
44public override string ToString() => _entityTag?.ToString() ?? _date.ToString("r");
System\Net\Http\Headers\RetryConditionHeaderValue.cs (1)
47: _date.ToString("r");
System.Windows.Forms.Tests (3)
System\Windows\Forms\DataObjectTests.cs (3)
3004deserialized.Date.ToString(offsetFormat).Should().Be(forecast.Date.ToString(offsetFormat)); 3076writer.WriteString(nameof(WeatherForecast.Date), value.Date.ToString("MM/dd/yyyy"));