169 instantiations of DateTimeOffset
Aspire.Cli.Tests (4)
Commands\RunCommandTests.cs (4)
153var now = new DateTimeOffset(2026, 02, 12, 18, 00, 00, TimeSpan.Zero);
1513Timestamp = new DateTimeOffset(2026, 3, 16, 12, 0, 0, TimeSpan.Zero),
1521Timestamp = new DateTimeOffset(2026, 3, 16, 12, 0, 1, TimeSpan.Zero),
1529Timestamp = new DateTimeOffset(2026, 3, 16, 12, 0, 2, TimeSpan.Zero),
Aspire.Dashboard.Components.Tests (1)
Aspire.Hosting (1)
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (7)
VersionChecking\VersionCheckServiceTests.cs (4)
74var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
109var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
149var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
275public DateTimeOffset UtcNow { get; set; } = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
dotnet-svcutil-lib (10)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.DataProtection.Extensions (1)
Microsoft.AspNetCore.Identity (2)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.Extensions.AI.Abstractions.Tests (37)
ChatCompletion\ChatResponseTests.cs (11)
61response.CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero);
62Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), response.CreatedAt);
91CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero),
108Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), result.CreatedAt);
135CreatedAt = new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero),
148Assert.Equal(new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), update0.CreatedAt);
164CreatedAt = new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero),
169CreatedAt = new DateTimeOffset(2025, 1, 1, 10, 30, 0, TimeSpan.Zero),
177CreatedAt = new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero),
190Assert.Equal(new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), update0.CreatedAt);
199Assert.Equal(new DateTimeOffset(2025, 1, 1, 10, 30, 0, TimeSpan.Zero), update1.CreatedAt);
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (20)
31new(ChatRole.Assistant, "Hello") { ResponseId = "someResponse", MessageId = "12345", CreatedAt = new DateTimeOffset(2024, 2, 3, 4, 5, 6, TimeSpan.Zero), ModelId = "model123" },
33new(null, "world!") { CreatedAt = new DateTimeOffset(2025, 2, 3, 4, 5, 6, TimeSpan.Zero), ConversationId = "123", AdditionalProperties = new() { ["c"] = "d" } },
49Assert.Equal(new DateTimeOffset(2024, 2, 3, 4, 5, 6, TimeSpan.Zero), response.CreatedAt);
541new(null, "Hi! ") { CreatedAt = new DateTimeOffset(2023, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" },
542new(ChatRole.Assistant, "Hello") { MessageId = "msg1", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 0, 0, TimeSpan.Zero), AuthorName = "Assistant" },
543new(null, " from") { MessageId = "msg1", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 1, 0, TimeSpan.Zero) }, // Later CreatedAt should not overwrite first
547new(null, "More text") { MessageId = "msg2", CreatedAt = new DateTimeOffset(2024, 1, 1, 10, 2, 0, TimeSpan.Zero), AuthorName = "Assistant" },
550new(ChatRole.User, "How") { MessageId = "msg3", CreatedAt = new DateTimeOffset(2024, 1, 1, 11, 0, 0, TimeSpan.Zero), AuthorName = "User" },
551new(null, " are") { MessageId = "msg3", CreatedAt = new DateTimeOffset(2024, 1, 1, 11, 1, 0, TimeSpan.Zero) },
555new(ChatRole.Assistant, "I'm doing well,") { MessageId = "msg4", CreatedAt = new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero) },
556new(null, " thank you!") { MessageId = "msg4", CreatedAt = new DateTimeOffset(2024, 1, 1, 12, 2, 0, TimeSpan.Zero) }, // Later CreatedAt should not overwrite first
574Assert.Equal(new DateTimeOffset(2023, 1, 1, 10, 0, 0, TimeSpan.Zero), message1.CreatedAt); // First value should win
582Assert.Equal(new DateTimeOffset(2024, 1, 1, 10, 2, 0, TimeSpan.Zero), message2.CreatedAt);
590Assert.Equal(new DateTimeOffset(2024, 1, 1, 11, 0, 0, TimeSpan.Zero), message3.CreatedAt); // First value should win
598Assert.Equal(new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero), message4.CreatedAt); // First value should win
824DateTimeOffset early = new(2024, 1, 1, 10, 0, 0, TimeSpan.Zero);
825DateTimeOffset middle = new(2024, 1, 1, 11, 0, 0, TimeSpan.Zero);
826DateTimeOffset late = new(2024, 1, 1, 12, 0, 0, TimeSpan.Zero);
827DateTimeOffset unixEpoch = new(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
828DateTimeOffset beforeEpoch = new(1969, 12, 31, 23, 59, 59, TimeSpan.Zero);
ChatCompletion\ChatResponseUpdateTests.cs (5)
76update.CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero);
77Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), update.CreatedAt);
130CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero),
161Assert.Equal(new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), result.CreatedAt);
178var originalCreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero);
Microsoft.Extensions.AI.OpenAI.Tests (12)
OpenAIConversionTests.cs (12)
803ChatMessageRole.User, null, null, null, new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero),
813Assert.Equal(new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero), response.CreatedAt);
844Assert.Equal(new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero), response.CreatedAt);
869null, null, null, OpenAI.Chat.ChatFinishReason.ToolCalls, new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero),
998CreatedAt = new DateTimeOffset(2025, 1, 3, 14, 30, 0, TimeSpan.Zero),
1013Assert.Equal(new DateTimeOffset(2025, 1, 3, 14, 30, 0, TimeSpan.Zero), completion.CreatedAt);
1160createdAt: new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero),
1187CreatedAt = new DateTimeOffset(2025, 1, 1, 12, 0, 0, TimeSpan.Zero)
1202Assert.Equal(new DateTimeOffset(2025, 1, 1, 12, 0, 0, TimeSpan.Zero), streamingUpdate.CreatedAt);
1453CreatedAt = new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero),
1481CreatedAt = new DateTimeOffset(2025, 1, 15, 10, 30, 0, TimeSpan.Zero),
1490Assert.Equal(new DateTimeOffset(2025, 1, 15, 10, 30, 0, TimeSpan.Zero), openAIResponse.CreatedAt);
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Extensions.TimeProvider.Testing.Tests (10)
FakeTimeProviderTests.cs (10)
46var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);
52Assert.Equal(nowOffset, new DateTimeOffset(timestamp1, TimeSpan.Zero));
53Assert.Equal(nowOffset, new DateTimeOffset(timestamp2, TimeSpan.Zero));
60var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);
69Assert.Equal(nowOffset, new DateTimeOffset(timestamp1, TimeSpan.Zero));
70Assert.Equal(nowOffset.AddMilliseconds(msToElapse), new DateTimeOffset(timestamp2, TimeSpan.Zero));
103var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero));
162var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero));
186var timeProvider = new FakeTimeProvider(new DateTimeOffset(2001, 2, 3, 4, 5, 6, TimeSpan.Zero));
280var dto = new DateTimeOffset(new DateTime(2022, 1, 2, 3, 4, 5, 6), TimeSpan.Zero);
Microsoft.Maui.Essentials (1)
Microsoft.ML.Data (1)
Microsoft.ML.Tests (8)
Scenarios\Api\TestApi.cs (8)
423DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(1, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 0)
427DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(2, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 10)
431DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(1, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 10)
435DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(2, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 0)
439DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(3, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 20)
443DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(4, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 30)
447DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(3, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 30)
451DateTimeOffsetStrat = new DateTimeOffset(2002, 2, 23, 3, 30, 0, new TimeSpan(4, 0, 0)), TimeSpanStrat = new TimeSpan(2, 0, 20)
Microsoft.Private.Windows.Core (4)
NuGet.PackageManagement (1)
Shared.Tests (1)
System.Data.Common (1)
System.Formats.Asn1 (3)
System.Formats.Tar (2)
System.IO.Compression (1)
System.IO.FileSystem.AccessControl (1)
System.IO.IsolatedStorage (6)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (6)
243return new DateTimeOffset(File.GetCreationTime(GetFullPath(path)));
247return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
259return new DateTimeOffset(File.GetLastAccessTime(GetFullPath(path)));
263return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
275return new DateTimeOffset(File.GetLastWriteTime(GetFullPath(path)));
279return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
System.Net.Mail (1)
System.Private.CoreLib (21)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (13)
62public static readonly DateTimeOffset MaxValue = new DateTimeOffset(0, DateTime.CreateUnchecked(DateTime.MaxTicks));
63public static readonly DateTimeOffset UnixEpoch = new DateTimeOffset(0, DateTime.CreateUnchecked(DateTime.UnixEpochTicks));
85private static DateTimeOffset CreateValidateOffset(DateTime dateTime, TimeSpan offset) => new DateTimeOffset(ValidateOffset(offset), ValidateDate(dateTime, offset));
159DateTimeOffset value = new(year, month, day, hour, minute, 59, offset);
194DateTimeOffset value = new DateTimeOffset(year, month, day, hour, minute, 59, millisecond, calendar, offset);
219/// the <see cref="DateTimeOffset(int, int, int, int, int, int, int, int, Calendar, TimeSpan)"/> constructor.
276/// the <see cref="DateTimeOffset(int, int, int, int, int, int, int, int, Calendar, TimeSpan)"/> constructor.
332public static DateTimeOffset UtcNow => new DateTimeOffset(0, DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Unspecified));
533private DateTimeOffset Add(DateTime dateTime) => new DateTimeOffset(_offsetMinutes, ValidateDate(dateTime, Offset));
594return new DateTimeOffset(0, DateTime.CreateUnchecked(ticks));
608return new DateTimeOffset(0, DateTime.CreateUnchecked(ticks));
811public DateTimeOffset ToUniversalTime() => new DateTimeOffset(0, _dateTime);
977new DateTimeOffset(dateTime);
System.Private.DataContractSerialization (2)
System.Private.Windows.Core (4)
System.Private.Xml (6)
System.Runtime.InteropServices.JavaScript (2)
System.ServiceModel.Primitives (2)
System.Text.Json (2)
VBCSCompiler (2)
2951 references to DateTimeOffset
aspire (61)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Azure.Npgsql.Tests (1)
Aspire.Azure.Security.KeyVault.Tests (1)
Aspire.Cli.Tests (38)
Certificates\CertificateServiceTests.cs (12)
31Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.Full, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
70Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.None, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
77Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.Full, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
121Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.Partial, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
168Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.Full, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
205Certificates = [new DevCertInfo { Version = 5, TrustLevel = CertificateManager.TrustLevel.None, IsHttpsDevelopmentCertificate = true, ValidityNotBefore = DateTimeOffset.Now.AddDays(-1), ValidityNotAfter = DateTimeOffset.Now.AddDays(365) }]
Aspire.Confluent.Kafka (32)
Aspire.Dashboard (67)
Components\Controls\Chart\ChartBase.cs (31)
27private DateTimeOffset _lastUpdateTime;
28private DateTimeOffset _currentDataStartTime;
81var inProgressDataTime = PauseManager.AreMetricsPaused(out var pausedAt) ? pausedAt.Value : GetCurrentDataTime();
124private (List<ChartTrace> Y, List<DateTimeOffset> X, List<ChartExemplar> Exemplars) CalculateHistogramValues(List<DimensionScope> dimensions, int pointCount, bool tickUpdate, DateTimeOffset inProgressDataTime, string yLabel)
133var xValues = new List<DateTimeOffset>();
135var startDate = _currentDataStartTime;
136DateTimeOffset? firstPointEndTime = null;
137DateTimeOffset? lastPointStartTime = null;
143var start = CalcOffset(pointIndex, startDate, pointDuration);
144var end = CalcOffset(pointIndex - 1, startDate, pointDuration);
201private string FormatTooltip(string name, double yValue, DateTimeOffset xValue)
216internal bool TryCalculateHistogramPoints(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, Dictionary<int, ChartTrace> traces, List<ChartExemplar> exemplars)
324var exemplarStart = TimeProvider.ToLocalDateTimeOffset(exemplar.Start);
377private (List<ChartTrace> Y, List<DateTimeOffset> X, List<ChartExemplar> Exemplars) CalculateChartValues(List<DimensionScope> dimensions, int pointCount, bool tickUpdate, DateTimeOffset inProgressDataTime, string yLabel)
381var xValues = new List<DateTimeOffset>();
383var startDate = _currentDataStartTime;
384DateTimeOffset? firstPointEndTime = null;
390var start = CalcOffset(pointIndex, startDate, pointDuration);
391var end = CalcOffset(pointIndex - 1, startDate, pointDuration);
437private bool TryCalculatePoint(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, List<ChartExemplar> exemplars, out double pointValue)
479private static DateTimeOffset CalcOffset(int pointIndex, DateTimeOffset now, TimeSpan pointDuration)
484private async Task UpdateChartAsync(bool tickUpdate, DateTimeOffset inProgressDataTime)
498List<DateTimeOffset> xValues;
519private DateTimeOffset GetCurrentDataTime()
529protected abstract Task OnChartUpdatedAsync(List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars, bool tickUpdate, DateTimeOffset inProgressDataTime, CancellationToken cancellationToken);
Components\Controls\Chart\MetricTable.razor.cs (13)
22private SortedList<DateTimeOffset, MetricViewBase> _metrics = [];
30private DateTimeOffset? _lastUpdate;
45protected override async Task OnChartUpdatedAsync(List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars, bool tickUpdate, DateTimeOffset inProgressDataTime, CancellationToken cancellationToken)
118private SortedList<DateTimeOffset, MetricViewBase> UpdateMetrics(out ISet<DateTimeOffset> addedXValues, List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars)
120var newMetrics = new SortedList<DateTimeOffset, MetricViewBase>();
126var xValue = xValues[i];
210var endTime = (i != newMetrics.Count - 1) ? current.DateTime : (DateTimeOffset?)null;
211var startTime = (i > 0) ? newMetrics.GetKeyAtIndex(i - 1) : (DateTimeOffset?)null;
219var latestCurrentMetric = _metrics.Keys.OfType<DateTimeOffset?>().LastOrDefault();
293public required DateTimeOffset DateTime { get; set; }
Components\Controls\Chart\PlotlyChart.razor.cs (9)
44private string FormatTooltip(string title, double yValue, DateTimeOffset xValue)
58protected override async Task OnChartUpdatedAsync(List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars, bool tickUpdate, DateTimeOffset inProgressDataTime, CancellationToken cancellationToken)
110private PlotlyTrace CalculateExemplarsTrace(List<DateTimeOffset> xValues, List<ChartExemplar> exemplars)
123var start = i > 0 ? xValues[i - 1] : (DateTimeOffset?)null;
124var end = i < xValues.Count ? xValues[i] : (DateTimeOffset?)null;
152X = new List<DateTimeOffset>(),
244private readonly record struct ExemplarGroupKey(DateTimeOffset? Start, DateTimeOffset? End);
Aspire.Dashboard.Components.Tests (13)
Aspire.Dashboard.Tests (13)
Aspire.Hosting (20)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Tests (18)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.Maui (4)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.RemoteHost.Tests (1)
Aspire.Hosting.Testing.Tests (9)
Aspire.Hosting.Tests (38)
VersionChecking\VersionCheckServiceTests.cs (8)
74var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
75var lastCheckDate = currentDate.AddMinutes(-1);
109var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
110var lastCheckDate = currentDate.AddMinutes(-1);
149var currentDate = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
150var lastCheckDate = currentDate.AddMinutes(-1);
275public DateTimeOffset UtcNow { get; set; } = new DateTimeOffset(2000, 12, 29, 20, 59, 59, TimeSpan.Zero);
277public override DateTimeOffset GetUtcNow()
Aspire.Microsoft.Azure.StackExchangeRedis.Tests (1)
Aspire.Playground.Tests (8)
Aspire.TypeSystem (2)
AzureSearch.ApiService (1)
CdkSample.ApiService (3)
ConfigurationSchemaGenerator (1)
csc (1)
dotnet (49)
_generated\108\WorkloadHistoryJsonSerializerContext.WorkloadHistoryRecord.g.cs (6)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
68AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Workload.WorkloadHistoryRecord).GetProperty("TimeStarted", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info0);
73var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
88AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Workload.WorkloadHistoryRecord).GetProperty("TimeCompleted", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
91properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info1);
_generated\157\TelemetryDiskLoggerJsonSerializerContext.EventModel.g.cs (7)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.EventModel((string)args[0], (global::System.DateTimeOffset)args[1], (global::System.Collections.Generic.Dictionary<string, object>)args[2]),
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.EventModel).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::System.DateTimeOffset), typeof(global::System.Collections.Generic.Dictionary<string, object>)}, modifiers: null),
75var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
90AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.EventModel).GetProperty("timestamp", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
93properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info1);
155ParameterType = typeof(global::System.DateTimeOffset),
176private static extern void __set_EventModel_timestamp(global::Microsoft.DotNet.Cli.Telemetry.TelemetryDiskLogger.EventModel obj, global::System.DateTimeOffset value);
dotnet-dev-certs (11)
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (170)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\SqlUtils.cs (14)
946public static DateTimeOffset XsdKatmaiDateToDateTimeOffset(byte[] data, int offset)
949return (DateTimeOffset)XsdKatmaiDateToDateTime(data, offset);
952public static DateTimeOffset XsdKatmaiDateTimeToDateTimeOffset(byte[] data, int offset)
955return (DateTimeOffset)XsdKatmaiDateTimeToDateTime(data, offset);
958public static DateTimeOffset XsdKatmaiTimeToDateTimeOffset(byte[] data, int offset)
961return (DateTimeOffset)XsdKatmaiTimeToDateTime(data, offset);
964public static DateTimeOffset XsdKatmaiDateOffsetToDateTimeOffset(byte[] data, int offset)
970public static DateTimeOffset XsdKatmaiDateTimeOffsetToDateTimeOffset(byte[] data, int offset)
977DateTimeOffset dto = new DateTimeOffset(dateTicks + timeTicks + zoneTicks, new TimeSpan(zoneTicks));
981public static DateTimeOffset XsdKatmaiTimeOffsetToDateTimeOffset(byte[] data, int offset)
1016DateTimeOffset dto = XsdKatmaiDateOffsetToDateTimeOffset(data, offset);
1025DateTimeOffset dto = XsdKatmaiDateTimeOffsetToDateTimeOffset(data, offset);
1036DateTimeOffset dto = XsdKatmaiTimeOffsetToDateTimeOffset(data, offset);
1091private static int GetFractions(DateTimeOffset dt)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (122)
169public abstract bool ToBoolean(DateTimeOffset value);
180public abstract int ToInt32(DateTimeOffset value);
191public abstract long ToInt64(DateTimeOffset value);
202public abstract decimal ToDecimal(DateTimeOffset value);
213public abstract double ToDouble(DateTimeOffset value);
224public abstract float ToSingle(DateTimeOffset value);
235public abstract DateTime ToDateTime(DateTimeOffset value);
239public abstract DateTimeOffset ToDateTimeOffset(bool value);
240public abstract DateTimeOffset ToDateTimeOffset(int value);
241public abstract DateTimeOffset ToDateTimeOffset(long value);
242public abstract DateTimeOffset ToDateTimeOffset(decimal value);
243public abstract DateTimeOffset ToDateTimeOffset(float value);
244public abstract DateTimeOffset ToDateTimeOffset(double value);
245public abstract DateTimeOffset ToDateTimeOffset(DateTime value);
246public abstract DateTimeOffset ToDateTimeOffset(DateTimeOffset value);
247public abstract DateTimeOffset ToDateTimeOffset(string value);
248public abstract DateTimeOffset ToDateTimeOffset(object value);
257public abstract string ToString(DateTimeOffset value);
270public abstract object ChangeType(DateTimeOffset value, Type destinationType);
366protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset);
376public override bool ToBoolean(DateTimeOffset value) { return (bool)ChangeType((object)value, BooleanType, null); }
387public override DateTime ToDateTime(DateTimeOffset value) { return (DateTime)ChangeType((object)value, DateTimeType, null); }
396public override DateTimeOffset ToDateTimeOffset(bool value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
397public override DateTimeOffset ToDateTimeOffset(DateTime value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
398public override DateTimeOffset ToDateTimeOffset(DateTimeOffset value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
399public override DateTimeOffset ToDateTimeOffset(decimal value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
400public override DateTimeOffset ToDateTimeOffset(double value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
401public override DateTimeOffset ToDateTimeOffset(int value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
402public override DateTimeOffset ToDateTimeOffset(long value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
403public override DateTimeOffset ToDateTimeOffset(float value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
404public override DateTimeOffset ToDateTimeOffset(string value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
405public override DateTimeOffset ToDateTimeOffset(object value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
409public override decimal ToDecimal(DateTimeOffset value) { return (decimal)ChangeType((object)value, DecimalType, null); }
420public override double ToDouble(DateTimeOffset value) { return (double)ChangeType((object)value, DoubleType, null); }
431public override int ToInt32(DateTimeOffset value) { return (int)ChangeType((object)value, Int32Type, null); }
442public override long ToInt64(DateTimeOffset value) { return (long)ChangeType((object)value, Int64Type, null); }
453public override float ToSingle(DateTimeOffset value) { return (float)ChangeType((object)value, SingleType, null); }
464public override string ToString(DateTimeOffset value) { return (string)ChangeType((object)value, StringType, null); }
477public override object ChangeType(DateTimeOffset value, Type destinationType) { return (object)ChangeType((object)value, destinationType, null); }
659protected static DateTimeOffset StringToDateOffset(string value)
661return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Date));
664protected static DateTimeOffset StringToDateTimeOffset(string value)
666return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.DateTime));
669protected static DateTimeOffset StringToGDayOffset(string value)
671return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GDay));
674protected static DateTimeOffset StringToGMonthOffset(string value)
676return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonth));
679protected static DateTimeOffset StringToGMonthDayOffset(string value)
681return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonthDay));
684protected static DateTimeOffset StringToGYearOffset(string value)
686return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYear));
689protected static DateTimeOffset StringToGYearMonthOffset(string value)
691return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYearMonth));
740protected static DateTimeOffset StringToTimeOffset(string value)
742return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Time));
811protected static string DateOffsetToString(DateTimeOffset value)
816protected static string DateTimeOffsetToString(DateTimeOffset value)
821protected static string GDayOffsetToString(DateTimeOffset value)
826protected static string GMonthOffsetToString(DateTimeOffset value)
831protected static string GMonthDayOffsetToString(DateTimeOffset value)
836protected static string GYearOffsetToString(DateTimeOffset value)
841protected static string GYearMonthOffsetToString(DateTimeOffset value)
865protected static string TimeOffsetToString(DateTimeOffset value)
880internal static DateTime DateTimeOffsetToDateTime(DateTimeOffset value)
962protected static DateTimeOffset UntypedAtomicToDateTimeOffset(string value)
964return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.AllXsd));
1564public override DateTime ToDateTime(DateTimeOffset value)
1592if (sourceType == DateTimeOffsetType) return this.ToDateTime((DateTimeOffset)value);
1603public override DateTimeOffset ToDateTimeOffset(DateTime value)
1608public override DateTimeOffset ToDateTimeOffset(DateTimeOffset value)
1610return ((DateTimeOffset)value);
1613public override DateTimeOffset ToDateTimeOffset(string value)
1630public override DateTimeOffset ToDateTimeOffset(object value)
1637if (sourceType == DateTimeOffsetType) return ((DateTimeOffset)value);
1639if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue)value).ValueAsDateTime;
1641return (DateTimeOffset)ChangeListType(value, DateTimeOffsetType, null);
1698public override string ToString(DateTimeOffset value)
1702case XmlTypeCode.Date: return DateOffsetToString((DateTimeOffset)value);
1703case XmlTypeCode.Time: return TimeOffsetToString((DateTimeOffset)value);
1704case XmlTypeCode.GDay: return GDayOffsetToString((DateTimeOffset)value);
1705case XmlTypeCode.GMonth: return GMonthOffsetToString((DateTimeOffset)value);
1706case XmlTypeCode.GMonthDay: return GMonthDayOffsetToString((DateTimeOffset)value);
1707case XmlTypeCode.GYear: return GYearOffsetToString((DateTimeOffset)value);
1708case XmlTypeCode.GYearMonth: return GYearMonthOffsetToString((DateTimeOffset)value);
1710return DateTimeOffsetToString((DateTimeOffset)value);
1726if (sourceType == DateTimeOffsetType) return this.ToString((DateTimeOffset)value);
1752public override object ChangeType(DateTimeOffset value, Type destinationType)
1757if (destinationType == DateTimeType) return this.ToDateTime((DateTimeOffset)value);
1758if (destinationType == DateTimeOffsetType) return ((DateTimeOffset)value);
1759if (destinationType == StringType) return this.ToString((DateTimeOffset)value);
1760if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value));
1761if (destinationType == XPathItemType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value));
1795if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value));
1802if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value));
2463public override DateTimeOffset ToDateTimeOffset(string value)
2470public override DateTimeOffset ToDateTimeOffset(object value)
2478return (DateTimeOffset)ChangeTypeWildcardDestination(value, DateTimeOffsetType, null);
2603public override string ToString(DateTimeOffset value)
2605return DateTimeOffsetToString((DateTimeOffset)value);
2643if (sourceType == DateTimeOffsetType) return DateTimeOffsetToString((DateTimeOffset)value);
2688public override object ChangeType(DateTimeOffset value, Type destinationType)
2693if (destinationType == StringType) return DateTimeOffsetToString((DateTimeOffset)value);
3087public override DateTimeOffset ToDateTimeOffset(object value)
3093if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue)value).ValueAs(DateTimeOffsetType);
3095return (DateTimeOffset)ChangeTypeWildcardDestination(value, DateTimeOffsetType, null);
3210public override object ChangeType(DateTimeOffset value, Type destinationType)
3215if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime), (DateTimeOffset)value));
3328if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime), (DateTimeOffset)value));
3518if (itemTypeDst == DateTimeOffsetType) return ToArray<DateTimeOffset>(value, nsResolver);
dotnet-user-jwts (33)
_generated\1\JwtSerializerContext.Jwt.g.cs (21)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt((string)args[0], (string)args[1], (string)args[2], (string)args[3], (global::System.DateTimeOffset)args[4], (global::System.DateTimeOffset)args[5], (global::System.DateTimeOffset)args[6], (string)args[7]),
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(string), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(string)}, modifiers: null),
133var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
148AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("NotBefore", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
151properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info4);
153var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
168AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Expires", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
171properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info5);
173var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
188AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Issued", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
191properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info6);
351ParameterType = typeof(global::System.DateTimeOffset),
361ParameterType = typeof(global::System.DateTimeOffset),
371ParameterType = typeof(global::System.DateTimeOffset),
398private static extern void __set_Jwt_NotBefore(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
400private static extern void __set_Jwt_Expires(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
402private static extern void __set_Jwt_Issued(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore.Authentication (4)
Microsoft.AspNetCore.Authentication.Abstractions (8)
Microsoft.AspNetCore.Authentication.BearerToken (2)
Microsoft.AspNetCore.Authentication.Certificate (2)
Microsoft.AspNetCore.Authentication.Cookies (9)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
Microsoft.AspNetCore.Authentication.Twitter (2)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.Components (64)
BindConverter.cs (39)
333/// <param name="format">The format to use. Provided to <see cref="DateTimeOffset.ToString(string, IFormatProvider)"/>.</param>
413public static string FormatValue(DateTimeOffset value, CultureInfo? culture = null) => FormatDateTimeOffsetValueCore(value, format: null, culture);
419/// <param name="format">The format to use. Provided to <see cref="DateTimeOffset.ToString(string, IFormatProvider)"/>.</param>
425public static string FormatValue(DateTimeOffset value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, CultureInfo? culture = null) => FormatDateTimeOffsetValueCore(value, format, culture);
427private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, string? format, CultureInfo? culture)
437private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, CultureInfo? culture)
451public static string? FormatValue(DateTimeOffset? value, CultureInfo? culture = null) => FormatNullableDateTimeOffsetValueCore(value, format: null, culture);
457/// <param name="format">The format to use. Provided to <see cref="DateTimeOffset.ToString(string, IFormatProvider)"/>.</param>
463public static string? FormatValue(DateTimeOffset? value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, CultureInfo? culture = null) => FormatNullableDateTimeOffsetValueCore(value, format, culture);
465private static string? FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, string? format, CultureInfo? culture)
480private static string? FormatNullableDateTimeOffsetValueCore(DateTimeOffset? value, CultureInfo? culture)
1281/// Attempts to convert a value to a <see cref="System.DateTimeOffset"/>.
1287public static bool TryConvertToDateTimeOffset(object? obj, CultureInfo? culture, out DateTimeOffset value)
1293/// Attempts to convert a value to a <see cref="System.DateTimeOffset"/>.
1300public static bool TryConvertToDateTimeOffset(object? obj, CultureInfo? culture, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, out DateTimeOffset value)
1306/// Attempts to convert a value to a nullable <see cref="System.DateTimeOffset"/>.
1312public static bool TryConvertToNullableDateTimeOffset(object? obj, CultureInfo? culture, out DateTimeOffset? value)
1318/// Attempts to convert a value to a nullable <see cref="System.DateTimeOffset"/>.
1325public static bool TryConvertToNullableDateTimeOffset(object? obj, CultureInfo? culture, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, out DateTimeOffset? value)
1330internal static BindParser<DateTimeOffset> ConvertToDateTimeOffset = ConvertToDateTimeOffsetCore;
1331internal static BindParserWithFormat<DateTimeOffset> ConvertToDateTimeOffsetWithFormat = ConvertToDateTimeOffsetCore;
1332internal static BindParser<DateTimeOffset?> ConvertToNullableDateTimeOffset = ConvertToNullableDateTimeOffsetCore;
1333internal static BindParserWithFormat<DateTimeOffset?> ConvertToNullableDateTimeOffsetWithFormat = ConvertToNullableDateTimeOffsetCore;
1335private static bool ConvertToDateTimeOffsetCore(object? obj, CultureInfo? culture, out DateTimeOffset value)
1340private static bool ConvertToDateTimeOffsetCore(object? obj, CultureInfo? culture, string? format, out DateTimeOffset value)
1349if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1354else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1364private static bool ConvertToNullableDateTimeOffsetCore(object? obj, CultureInfo? culture, out DateTimeOffset? value)
1369private static bool ConvertToNullableDateTimeOffsetCore(object? obj, CultureInfo? culture, string? format, out DateTimeOffset? value)
1378if (format != null && DateTimeOffset.TryParseExact(text, format, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out var converted))
1383else if (format == null && DateTimeOffset.TryParse(text, culture ?? CultureInfo.CurrentCulture, DateTimeStyles.None, out converted))
1767else if (typeof(T) == typeof(DateTimeOffset))
1769formatter = (BindFormatter<DateTimeOffset>)FormatDateTimeOffsetValueCore;
1771else if (typeof(T) == typeof(DateTimeOffset?))
1773formatter = (BindFormatter<DateTimeOffset?>)FormatNullableDateTimeOffsetValueCore;
1966else if (typeof(T) == typeof(DateTimeOffset))
1970else if (typeof(T) == typeof(DateTimeOffset?))
EventCallbackFactoryBinderExtensions.cs (24)
806Action<DateTimeOffset> setter,
807DateTimeOffset existingValue,
810return CreateBinderCore<DateTimeOffset>(factory, receiver, setter, culture, ConvertToDateTimeOffset);
826Func<DateTimeOffset, Task> setter,
827DateTimeOffset existingValue,
830return CreateBinderCoreAsync<DateTimeOffset>(factory, receiver, setter, culture, ConvertToDateTimeOffset);
847Action<DateTimeOffset> setter,
848DateTimeOffset existingValue,
852return CreateBinderCore<DateTimeOffset>(factory, receiver, setter, culture, format, ConvertToDateTimeOffsetWithFormat);
869Func<DateTimeOffset, Task> setter,
870DateTimeOffset existingValue,
874return CreateBinderCoreAsync<DateTimeOffset>(factory, receiver, setter, culture, format, ConvertToDateTimeOffsetWithFormat);
890Action<DateTimeOffset?> setter,
891DateTimeOffset? existingValue,
894return CreateBinderCore<DateTimeOffset?>(factory, receiver, setter, culture, ConvertToNullableDateTimeOffset);
910Func<DateTimeOffset?, Task> setter,
911DateTimeOffset? existingValue,
914return CreateBinderCoreAsync<DateTimeOffset?>(factory, receiver, setter, culture, ConvertToNullableDateTimeOffset);
931Action<DateTimeOffset?> setter,
932DateTimeOffset? existingValue,
936return CreateBinderCore<DateTimeOffset?>(factory, receiver, setter, culture, format, ConvertToNullableDateTimeOffsetWithFormat);
953Func<DateTimeOffset?, Task> setter,
954DateTimeOffset? existingValue,
958return CreateBinderCoreAsync<DateTimeOffset?>(factory, receiver, setter, culture, format, ConvertToNullableDateTimeOffsetWithFormat);
Microsoft.AspNetCore.Components.Endpoints (11)
Microsoft.AspNetCore.Components.Server (4)
Microsoft.AspNetCore.Components.Web (5)
Microsoft.AspNetCore.Components.WebView (4)
Microsoft.AspNetCore.DataProtection (107)
_generated\0\LoggerMessage.g.cs (30)
9private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Guid, global::System.DateTimeOffset, global::System.Exception?> __UsingFallbackKeyWithExpirationAsDefaultKeyCallback =
10global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Guid, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(1, "UsingFallbackKeyWithExpirationAsDefaultKey"), "Policy resolution states that a new key should be added to the key ring, but automatic generation of keys is disabled. Using fallback key {KeyId:B} with expiration {ExpirationDate:u} as default key.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
17public static partial void UsingFallbackKeyWithExpirationAsDefaultKey(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.Guid keyId, global::System.DateTimeOffset expirationDate)
201private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Guid, global::System.DateTimeOffset, global::System.Exception?> __ConsideringKeyWithExpirationDateAsDefaultKeyCallback =
202global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Guid, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(13, "ConsideringKeyWithExpirationDateAsDefaultKey"), "Considering key {KeyId:B} with expiration date {ExpirationDate:u} as default key.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
209public static partial void ConsideringKeyWithExpirationDateAsDefaultKey(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.Guid keyId, global::System.DateTimeOffset expirationDate)
297private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.Exception?> __FoundRevocationOfAllKeysCreatedPriorToCallback =
298global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(19, "FoundRevocationOfAllKeysCreatedPriorTo"), "Found revocation of all keys created prior to {RevocationDate:u}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
305public static partial void FoundRevocationOfAllKeysCreatedPriorTo(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset revocationDate)
345private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, string?, global::System.Exception?> __RevokingAllKeysAsOfForReasonCallback =
346global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, string?>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(22, "RevokingAllKeysAsOfForReason"), "Revoking all keys as of {RevocationDate:u} for reason '{Reason}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
353public static partial void RevokingAllKeysAsOfForReason(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset revocationDate, string? reason)
553private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Guid, global::System.DateTimeOffset, string?, global::System.Exception?> __RevokingKeyForReasonCallback =
554global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Guid, global::System.DateTimeOffset, string?>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(36, "RevokingKeyForReason"), "Revoking key {KeyId:B} at {RevocationDate:u} for reason '{Reason}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
561public static partial void RevokingKeyForReason(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.Guid keyId, global::System.DateTimeOffset revocationDate, string? reason)
921private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Guid, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.Exception?> __CreatingKeyCallback =
922global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Guid, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(58, "CreatingKey"), "Creating key {KeyId:B} with creation date {CreationDate:u}, activation date {ActivationDate:u}, and expiration date {ExpirationDate:u}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
929public static partial void CreatingKey(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.Guid keyId, global::System.DateTimeOffset creationDate, global::System.DateTimeOffset activationDate, global::System.DateTimeOffset expirationDate)
1241private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.Exception?> __DateBasedRevocationSupersededCallback =
1242global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(79, "DateBasedRevocationSuperseded"), "Ignoring revocation of keys created before {OlderDate:u} in favor of revocation of keys created before {NewerDate:u}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
1249public static partial void DateBasedRevocationSuperseded(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset olderDate, global::System.DateTimeOffset newerDate)
KeyManagement\Key.cs (15)
37DateTimeOffset creationDate,
38DateTimeOffset activationDate,
39DateTimeOffset expirationDate,
59DateTimeOffset creationDate,
60DateTimeOffset activationDate,
61DateTimeOffset expirationDate,
79DateTimeOffset creationDate,
80DateTimeOffset activationDate,
81DateTimeOffset expirationDate,
97DateTimeOffset creationDate,
98DateTimeOffset activationDate,
99DateTimeOffset expirationDate,
116public DateTimeOffset ActivationDate { get; }
118public DateTimeOffset CreationDate { get; }
120public DateTimeOffset ExpirationDate { get; }
LoggingExtensions.cs (10)
44public static partial void UsingFallbackKeyWithExpirationAsDefaultKey(this ILogger logger, Guid keyId, DateTimeOffset expirationDate);
80public static partial void ConsideringKeyWithExpirationDateAsDefaultKey(this ILogger logger, Guid keyId, DateTimeOffset expirationDate);
98public static partial void FoundRevocationOfAllKeysCreatedPriorTo(this ILogger logger, DateTimeOffset revocationDate);
107public static partial void RevokingAllKeysAsOfForReason(this ILogger logger, DateTimeOffset revocationDate, string? reason);
146public static partial void RevokingKeyForReason(this ILogger logger, Guid keyId, DateTimeOffset revocationDate, string? reason);
215public static partial void CreatingKey(this ILogger logger, Guid keyId, DateTimeOffset creationDate, DateTimeOffset activationDate, DateTimeOffset expirationDate);
275public static partial void DateBasedRevocationSuperseded(this ILogger logger, DateTimeOffset olderDate, DateTimeOffset newerDate);
Microsoft.AspNetCore.DataProtection.Extensions (14)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (11)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.HeaderParsing (5)
Microsoft.AspNetCore.HeaderParsing.Tests (31)
Microsoft.AspNetCore.Hosting (4)
Microsoft.AspNetCore.Http (4)
Microsoft.AspNetCore.Http.Abstractions (4)
Microsoft.AspNetCore.Http.Connections (26)
Microsoft.AspNetCore.Http.Extensions (26)
Microsoft.AspNetCore.Http.Features (1)
Microsoft.AspNetCore.Http.Results (86)
_generated\0\LoggerMessage.g.cs (12)
257private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset?, global::System.DateTimeOffset?, global::System.Exception?> __IfUnmodifiedSincePreconditionFailedCallback =
258global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset?, global::System.DateTimeOffset?>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(35, "IfUnmodifiedSincePreconditionFailed"), "Current request's If-Unmodified-Since header check failed as the file was modified (at '{lastModified}') after the If-Unmodified-Since date '{IfUnmodifiedSinceDate}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
265public static partial void IfUnmodifiedSincePreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset? lastModified, global::System.DateTimeOffset? ifUnmodifiedSinceDate)
273private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset?, global::System.DateTimeOffset?, global::System.Exception?> __IfRangeLastModifiedPreconditionFailedCallback =
274global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset?, global::System.DateTimeOffset?>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(36, "IfRangeLastModifiedPreconditionFailed"), "Could not serve range as the file was modified (at {LastModified}) after the if-Range's last modified date '{IfRangeLastModified}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
281public static partial void IfRangeLastModifiedPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset? lastModified, global::System.DateTimeOffset? IfRangeLastModified)
Results.cs (20)
285/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
291/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
299DateTimeOffset? lastModified = null,
310/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
316/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
324DateTimeOffset? lastModified = null,
339/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
347DateTimeOffset? lastModified = null,
358/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
364/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
377DateTimeOffset? lastModified = null,
389/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
395/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
408DateTimeOffset? lastModified = null,
423/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
436DateTimeOffset? lastModified = null,
447/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
456DateTimeOffset? lastModified = null,
470/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
478DateTimeOffset? lastModified = null,
TypedResults.cs (22)
249/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
255/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
263DateTimeOffset? lastModified = null,
284/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para>
290/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
298DateTimeOffset? lastModified = null,
323/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
331DateTimeOffset? lastModified = null,
348/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
357/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
367DateTimeOffset? lastModified = null,
389/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>.
398/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
408DateTimeOffset? lastModified = null,
436/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
446DateTimeOffset? lastModified = null,
467/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.
476DateTimeOffset? lastModified = null,
499/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
507DateTimeOffset? lastModified = null,
532/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
540DateTimeOffset? lastModified = null,
Microsoft.AspNetCore.Identity (8)
Microsoft.AspNetCore.InternalTesting (21)
AssemblyTestLog.cs (13)
68var logStart = DateTimeOffset.UtcNow;
93public ILoggerFactory CreateLoggerFactory(ITestOutputHelper output, string className, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
97public ILoggerFactory CreateLoggerFactory(ITestOutputHelper output, string className, LogLevel minLogLevel, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
101public IServiceProvider CreateLoggerServices(ITestOutputHelper output, string className, LogLevel minLogLevel, out string normalizedTestName, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
105public IServiceProvider CreateLoggerServices(ITestOutputHelper output, string className, LogLevel minLogLevel, out string normalizedTestName, out string logOutputDirectory, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null)
186var logStart = DateTimeOffset.UtcNow;
272private static SerilogLoggerProvider ConfigureFileLogging(string fileName, DateTimeOffset? logStart)
325private readonly DateTimeOffset? _logStart;
327public AssemblyLogTimestampOffsetEnricher(DateTimeOffset? logStart)
337? $"{(DateTimeOffset.UtcNow - _logStart.Value).TotalSeconds.ToString("N3", CultureInfo.InvariantCulture)}s"
338: DateTimeOffset.UtcNow.ToString("s", CultureInfo.InvariantCulture)));
Microsoft.AspNetCore.Mvc.Abstractions (5)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Mvc.Core (69)
_generated\0\LoggerMessage.g.cs (12)
43private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset?, global::System.DateTimeOffset?, global::System.Exception?> __IfUnmodifiedSincePreconditionFailedCallback =
44global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset?, global::System.DateTimeOffset?>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(35, "IfUnmodifiedSincePreconditionFailed"), "Current request's If-Unmodified-Since header check failed as the file was modified (at '{lastModified}') after the If-Unmodified-Since date '{IfUnmodifiedSinceDate}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
51public static partial void IfUnmodifiedSincePreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset? lastModified, global::System.DateTimeOffset? ifUnmodifiedSinceDate)
59private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset?, global::System.DateTimeOffset?, global::System.Exception?> __IfRangeLastModifiedPreconditionFailedCallback =
60global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset?, global::System.DateTimeOffset?>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(36, "IfRangeLastModifiedPreconditionFailed"), "Could not serve range as the file was modified (at {LastModified}) after the if-Range's last modified date '{IfRangeLastModified}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
67public static partial void IfRangeLastModifiedPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset? lastModified, global::System.DateTimeOffset? IfRangeLastModified)
ControllerBase.cs (32)
1132/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1136public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1153/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1158public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1177/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1181public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1200/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1205public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1298/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1305public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1322/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1330public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1349/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1356public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1375/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1383public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1464/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1468public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1485/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1490public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1509/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1513public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1532/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1537public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1625/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1629public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1646/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1651public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
1670/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1674public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag)
1693/// <param name="lastModified">The <see cref="DateTimeOffset"/> of when the file was last modified.</param>
1698public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Microsoft.AspNetCore.OpenApi (8)
Microsoft.AspNetCore.OutputCaching (14)
_generated\0\LoggerMessage.g.cs (6)
41private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.Exception?> __NotModifiedIfModifiedSinceSatisfiedCallback =
42global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(3, "NotModifiedIfModifiedSinceSatisfied"), "The last modified date of {LastModified} is before the date {IfModifiedSince} specified in the 'IfModifiedSince' header.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
49internal static partial void NotModifiedIfModifiedSinceSatisfied(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset lastModified, global::System.DateTimeOffset ifModifiedSince)
Microsoft.AspNetCore.ResponseCaching (28)
_generated\0\LoggerMessage.g.cs (12)
153private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.Exception?> __ExpirationExpiresExceededCallback =
154global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(10, "ExpirationExpiresExceeded"), "The response time of the entry is {ResponseTime} and has exceeded the expiry date of {Expired} specified by the 'Expires' header.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
161internal static partial void ExpirationExpiresExceeded(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset responseTime, global::System.DateTimeOffset expired)
313private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.DateTimeOffset, global::System.Exception?> __NotModifiedIfModifiedSinceSatisfiedCallback =
314global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, global::System.DateTimeOffset>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(20, "NotModifiedIfModifiedSinceSatisfied"), "The last modified date of {LastModified} is before the date {IfModifiedSince} specified in the 'IfModifiedSince' header.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
321internal static partial void NotModifiedIfModifiedSinceSatisfied(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset lastModified, global::System.DateTimeOffset ifModifiedSince)
Microsoft.AspNetCore.Rewrite (12)
Microsoft.AspNetCore.Routing (3)
Microsoft.AspNetCore.Server.HttpSys (4)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (18)
_generated\0\LoggerMessage.g.cs (3)
643private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.DateTimeOffset, global::System.TimeSpan, global::System.TimeSpan, global::System.Exception?> __HeartbeatSlowCallback =
644global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.DateTimeOffset, global::System.TimeSpan, global::System.TimeSpan>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(22, "HeartbeatSlow"), "As of \"{now}\", the heartbeat has been running for \"{heartbeatDuration}\" which is longer than \"{interval}\". This could be caused by thread pool starvation.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
651public static partial void HeartbeatSlow(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTimeOffset now, global::System.TimeSpan heartbeatDuration, global::System.TimeSpan interval)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Microsoft.AspNetCore.StaticAssets (10)
Microsoft.AspNetCore.StaticFiles (4)
Microsoft.AspNetCore.Testing (2)
Microsoft.Build (9)
Logging\BinaryLogger\ProjectImportsCollector.cs (6)
100DateTimeOffset? entryCreationStamp = null,
110DateTimeOffset? entryCreationStamp = null,
185private void AddFileFromMemoryCore(string filePath, string data, bool makePathAbsolute, DateTimeOffset? entryCreationStamp)
197private void AddFileFromMemoryCore(string filePath, Stream data, bool makePathAbsolute, DateTimeOffset? entryCreationStamp)
208private void AddFileData(string filePath, Stream data, DateTimeOffset? entryCreationStamp)
239private Stream OpenArchiveEntry(string filePath, DateTimeOffset? entryCreationStamp)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.CodeAnalysis.Extensions.Package (1)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Microsoft.DotNet.Build.Tasks.Installers (3)
src\RpmBuilder.cs (3)
177private static readonly DateTimeOffset UnixEpoch = new(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
207entries.Add(new(RpmHeaderTag.ChangelogTimestamp, RpmHeaderEntryType.Int32, _changelogLines.Select(_ => (int)(DateTimeOffset.UtcNow - UnixEpoch).TotalSeconds).ToArray()));
209entries.Add(new(RpmHeaderTag.BuildTime, RpmHeaderEntryType.Int32, new[] { (int)(DateTimeOffset.UtcNow - UnixEpoch).TotalSeconds }));
Microsoft.DotNet.HotReload.Watch (2)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (8)
Microsoft.Extensions.AI.Abstractions.Tests (24)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (11)
824DateTimeOffset early = new(2024, 1, 1, 10, 0, 0, TimeSpan.Zero);
825DateTimeOffset middle = new(2024, 1, 1, 11, 0, 0, TimeSpan.Zero);
826DateTimeOffset late = new(2024, 1, 1, 12, 0, 0, TimeSpan.Zero);
827DateTimeOffset unixEpoch = new(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
828DateTimeOffset beforeEpoch = new(1969, 12, 31, 23, 59, 59, TimeSpan.Zero);
897DateTimeOffset? first = timestamp1 is not null ? DateTimeOffset.Parse(timestamp1, DateTimeFormatInfo.InvariantInfo) : null;
898DateTimeOffset? second = timestamp2 is not null ? DateTimeOffset.Parse(timestamp2, DateTimeFormatInfo.InvariantInfo) : null;
899DateTimeOffset? expected = expectedTimestamp is not null ? DateTimeOffset.Parse(expectedTimestamp, DateTimeFormatInfo.InvariantInfo) : null;
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AI.OpenAI.Tests (29)
Microsoft.Extensions.AI.Tests (5)
Microsoft.Extensions.Caching.Abstractions (13)
Microsoft.Extensions.Caching.Hybrid.Tests (4)
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Caching.SqlServer (12)
Microsoft.Extensions.Caching.StackExchangeRedis (31)
RedisCache.cs (31)
52private long _lastConnectTicks = DateTimeOffset.UtcNow.Ticks;
68private static DateTimeOffset ReadTimeTicks(ref long field)
71return ticks == 0 ? DateTimeOffset.MinValue : new DateTimeOffset(ticks, TimeSpan.Zero);
74private static void WriteTimeTicks(ref long field, DateTimeOffset value)
76var ticks = value == DateTimeOffset.MinValue ? 0L : value.UtcTicks;
169var creationTime = DateTimeOffset.UtcNow;
219var creationTime = DateTimeOffset.UtcNow;
249private static HashEntry[] GetHashFields(RedisValue value, DateTimeOffset? absoluteExpiration, TimeSpan? slidingExpiration)
359WriteTimeTicks(ref _lastConnectTicks, DateTimeOffset.UtcNow);
413MapMetadata(results, out DateTimeOffset? absExpr, out TimeSpan? sldExpr);
452MapMetadata(results, out DateTimeOffset? absExpr, out TimeSpan? sldExpr);
503private static void MapMetadata(RedisValue[] results, out DateTimeOffset? absoluteExpiration, out TimeSpan? slidingExpiration)
519private void Refresh(IDatabase cache, string key, DateTimeOffset? absExpr, TimeSpan sldExpr)
527var relExpr = absExpr.Value - DateTimeOffset.Now;
545private async Task RefreshAsync(IDatabase cache, string key, DateTimeOffset? absExpr, TimeSpan sldExpr, CancellationToken token)
555var relExpr = absExpr.Value - DateTimeOffset.Now;
576private static long? GetExpirationInSeconds(DateTimeOffset creationTime, DateTimeOffset? absoluteExpiration, DistributedCacheEntryOptions options)
595private static DateTimeOffset? GetAbsoluteExpiration(DateTimeOffset creationTime, DistributedCacheEntryOptions options)
637var utcNow = DateTimeOffset.UtcNow;
638var previousConnectTime = ReadTimeTicks(ref _lastConnectTicks);
647var firstErrorTime = ReadTimeTicks(ref _firstErrorTimeTicks);
648if (firstErrorTime == DateTimeOffset.MinValue)
671WriteTimeTicks(ref _firstErrorTimeTicks, DateTimeOffset.MinValue);
672WriteTimeTicks(ref _previousErrorTimeTicks, DateTimeOffset.MinValue);
731MapMetadata(metadata, out DateTimeOffset? absExpr, out TimeSpan? sldExpr);
778MapMetadata(metadata, out DateTimeOffset? absExpr, out TimeSpan? sldExpr);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (30)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (12)
Microsoft.Extensions.Diagnostics.Testing (4)
Microsoft.Extensions.Diagnostics.Testing.Tests (21)
Microsoft.Extensions.FileProviders.Abstractions (4)
Microsoft.Extensions.FileProviders.Embedded (16)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Identity.Core (18)
Microsoft.Extensions.Identity.Stores (7)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.AzureAppServices (10)
BatchingLogger.cs (2)
31public void Log<TState>(DateTimeOffset timestamp, LogLevel logLevel, EventId _, TState state, Exception exception, Func<TState, Exception, string> formatter)
72Log(DateTimeOffset.Now, logLevel, eventId, state, exception, formatter);
Microsoft.Extensions.Logging.Console (15)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.TimeProvider.Testing (7)
Microsoft.Extensions.TimeProvider.Testing.Tests (22)
FakeTimeProviderTests.cs (14)
19var now = timeProvider.GetUtcNow();
36var now2 = timeProvider.GetUtcNow();
46var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);
60var nowOffset = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);
108var now = timeProvider.GetUtcNow();
164var initialTimeUtcNow = timeProvider.GetUtcNow();
169var finalTimeUtcNow = timeProvider.GetUtcNow();
188var initialTimeUtcNow = timeProvider.GetUtcNow();
193var finalTimeUtcNow = timeProvider.GetUtcNow();
280var dto = new DateTimeOffset(new DateTime(2022, 1, 2, 3, 4, 5, 6), TimeSpan.Zero);
444var timeProvider = new FakeTimeProvider(DateTimeOffset.UtcNow)
449var first = timeProvider.GetUtcNow();
450var second = timeProvider.GetUtcNow();
451var third = timeProvider.GetUtcNow();
Microsoft.Extensions.Validation (1)
Microsoft.Gen.Logging.Generated.Tests (6)
Microsoft.Maui.Essentials (15)
Preferences\Preferences.shared.cs (9)
234 public static DateTimeOffset Get(string key, DateTimeOffset defaultValue) =>
238 public static void Set(string key, DateTimeOffset value) =>
250 public static DateTimeOffset Get(string key, DateTimeOffset defaultValue, string? sharedName) =>
251 Current.Get<DateTimeOffset>(key, defaultValue, sharedName);
254 public static void Set(string key, DateTimeOffset value, string? sharedName) =>
255 Current.Set<DateTimeOffset>(key, value, sharedName);
282 typeof(DateTimeOffset)
Microsoft.ML.Core (4)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (44)
Data\Conversion.cs (19)
19using DZ = DateTimeOffset;
238AddStd<TX, DZ>(Convert);
263AddStd<DZ, I8>(Convert);
264AddStd<DZ, R4>(Convert);
265AddStd<DZ, R8>(Convert);
266AddAux<DZ, SB>(Convert);
267AddStd<DZ, TX>(Convert);
293AddIsDef<DZ>(IsDefault);
315AddTryParse<DZ>(TryParse);
791private bool IsDefault(in DZ src) => src.Equals(default(DZ));
835public void Convert(in DZ src, ref I8 dst) => dst = (I8)src.UtcDateTime.Ticks;
893public void Convert(in DZ src, ref R4 dst) => dst = (R4)src.UtcDateTime.Ticks;
911public void Convert(in DZ src, ref R8 dst) => dst = (R8)src.UtcDateTime.Ticks;
936public void Convert(in DZ src, ref SB dst) { ClearDst(ref dst); dst.AppendFormat("{0:o}", src); }
954public void Convert(in DZ src, ref TX dst) => dst = string.Format("{0:o}", src).AsMemory();
1435public bool TryParse(in TX src, out DZ dst)
1443if (DateTimeOffset.TryParse(src.ToString(), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out dst))
1717public void Convert(in TX span, ref DZ value) => TryParse(in span, out value);
Transforms\ConversionsExtensionsCatalog.cs (12)
228/// The input data types can be numeric, text, boolean, <see cref="System.DateTime"/> or <see cref="System.DateTimeOffset"/>.
263/// The input data types can be numeric, text, boolean, <see cref="System.DateTime"/> or <see cref="System.DateTimeOffset"/>.
301/// The input data types can be numeric, text, boolean, <see cref="System.DateTime"/> or <see cref="System.DateTimeOffset"/>.
318/// The output data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types.</param>
322/// The input data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types.
361/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types.
394/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types.
425/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types,
429/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types,
466/// <see cref="System.DateTimeOffset"/> or <see cref="DataViewRowId"/> types, as specified in the <typeparamref name="TInputType"/> and <typeparamref name="TOutputType"/>.</param>
494/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/>
500/// The data types can be primitives or vectors of numeric, text, boolean, <see cref="System.DateTime"/>, <see cref="System.DateTimeOffset"/>
Microsoft.ML.DataView (2)
Microsoft.ML.IntegrationTests (2)
Microsoft.ML.Parquet (4)
Microsoft.ML.TestFramework (4)
Microsoft.ML.Tests (1)
Microsoft.ML.Transforms (2)
Microsoft.NET.Build.Containers (12)
AuthHandshakeMessageHandler.cs (10)
151private sealed record TokenResponse(string? token, string? access_token, int? expires_in, DateTimeOffset? issued_at)
154public DateTimeOffset ResolvedExpiration
158var issueTime = this.issued_at ?? DateTimeOffset.UtcNow; // per spec, if no issued_at use the current time
160var expirationTime = issueTime.AddSeconds(validityDuration);
171private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> GetAuthenticationAsync(string registry, string scheme, AuthInfo? bearerAuthInfo, CancellationToken cancellationToken)
197return new(authValue, DateTimeOffset.MaxValue);
455private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryOAuthPostAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken)
511private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryTokenGetAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken)
602if (await GetAuthenticationAsync(_registryName, scheme!, authInfo, cancellationToken).ConfigureAwait(false) is (AuthenticationHeaderValue authHeader, DateTimeOffset expirationTime))
Microsoft.Net.Http.Headers (24)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (13)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (39)
Microsoft.Private.Windows.Core (31)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TestPlatform.CommunicationUtilities (21)
Microsoft.VisualStudio.TestPlatform.ObjectModel (9)
mscorlib (1)
netstandard (1)
NuGet.CommandLine.XPlat (22)
NuGet.Common (7)
NuGet.PackageManagement (14)
NuGet.Packaging (42)
PackageCreation\Authoring\PackageBuilder.cs (13)
35private readonly DateTimeOffset _deterministicTimestamp = DateTimeOffset.UtcNow;
166_deterministicTimestamp = DateTimeOffset.UtcNow;
171_deterministicTimestamp = DateTimeOffset.UtcNow;
173else if (TryParseTimestamp(value, out DateTimeOffset parsedDateTimestamp))
186internal static bool TryParseTimestamp(string timestamp, out DateTimeOffset result)
190result = DateTimeOffset.FromUnixTimeSeconds(unixTimeSeconds);
195if (parsedDate is DateTimeOffset nonNullParsedTimestamp)
205private static DateTimeOffset? ParseRfc3339(string input)
217if (DateTimeOffset.TryParseExact(input, formats,
220out DateTimeOffset result))
902private static ZipArchiveEntry CreatePackageFileEntry(ZipArchive package, string entryName, DateTimeOffset timeOffset, CompressionLevel compressionLevel, StringBuilder warningMessage)
1107private void CreatePart(ZipArchive package, string path, Stream sourceStream, DateTimeOffset lastWriteTime, StringBuilder warningMessage)
NuGet.Protocol (117)
_generated\149\RepositorySignatureJsonContext.RepositoryCertificateInfo.g.cs (14)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.RepositoryCertificateInfo((global::NuGet.Packaging.Core.Fingerprints)args[0], (string)args[1], (string)args[2], (global::System.DateTimeOffset)args[3], (global::System.DateTimeOffset)args[4], (string)args[5]),
35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.RepositoryCertificateInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::NuGet.Packaging.Core.Fingerprints), typeof(string), typeof(string), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(string)}, modifiers: null),
119var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
134AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.RepositoryCertificateInfo).GetProperty("NotBefore", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
137properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info3);
140var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
155AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.RepositoryCertificateInfo).GetProperty("NotAfter", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
158properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info4);
221ParameterType = typeof(global::System.DateTimeOffset),
231ParameterType = typeof(global::System.DateTimeOffset),
250private static extern void __set_RepositoryCertificateInfo_NotBefore(global::NuGet.Protocol.RepositoryCertificateInfo obj, global::System.DateTimeOffset value);
252private static extern void __set_RepositoryCertificateInfo_NotAfter(global::NuGet.Protocol.RepositoryCertificateInfo obj, global::System.DateTimeOffset value);
RepoTasks (11)
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
746or nameof(DateTimeOffset)
Shared (3)
Shared.Tests (5)
Stress.ApiService (1)
System.Collections.Immutable (1)
System.CommandLine (3)
System.ComponentModel.TypeConverter (17)
System\ComponentModel\DateTimeOffsetConverter.cs (16)
11/// Provides a type converter to convert <see cref='System.DateTimeOffset'/>
18/// object in the given source type to a <see cref='System.DateTimeOffset'/>
46return DateTimeOffset.MinValue;
61return DateTimeOffset.Parse(text, formatInfo);
65return DateTimeOffset.Parse(text, culture);
70throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTimeOffset)), e);
78/// Converts the given value object to a <see cref='System.DateTimeOffset'/>
85if (destinationType == typeof(string) && value is DateTimeOffset)
87DateTimeOffset dto = (DateTimeOffset)value;
88if (dto == DateTimeOffset.MinValue)
131if (destinationType == typeof(InstanceDescriptor) && value is DateTimeOffset)
133DateTimeOffset dto = (DateTimeOffset)value;
138typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(long) }),
144typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(TimeSpan) }),
System.Data.Common (41)
System.Diagnostics.DiagnosticSource (12)
System\Diagnostics\ActivityEvent.cs (6)
22public ActivityEvent(string name) : this(name, DateTimeOffset.UtcNow, tags: null)
32public ActivityEvent(string name, DateTimeOffset timestamp = default, ActivityTagsCollection? tags = null) : this(name, timestamp, tags, tags is null ? 0 : tags.Count) { }
34internal ActivityEvent(string name, DateTimeOffset timestamp, ref TagList tags) : this(name, timestamp, tags, tags.Count) { }
36private ActivityEvent(string name, DateTimeOffset timestamp, IEnumerable<KeyValuePair<string, object?>>? tags, int tagsCount)
39Timestamp = timestamp != default ? timestamp : DateTimeOffset.UtcNow;
52public DateTimeOffset Timestamp { get; }
System\Diagnostics\ActivitySource.cs (4)
201public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default)
214public Activity? StartActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default)
227public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default, [CallerMemberName] string name = "")
231IEnumerable<ActivityLink>? links, DateTimeOffset startTime, bool startIt = true, ActivityIdFormat idFormat = ActivityIdFormat.Unknown)
System.Formats.Asn1 (30)
System.Formats.Cbor (8)
System.Formats.Tar (35)
System.IO.Compression (3)
System.IO.Compression.ZipFile (1)
System.IO.FileSystem.AccessControl (3)
System.IO.IsolatedStorage (3)
System.Linq.Expressions (2)
System.Net.Http (40)
System\Net\Http\Headers\WarningHeaderValue.cs (7)
16private readonly DateTimeOffset _date;
25public DateTimeOffset? Date => _dateHasValue ? _date : null;
27private WarningHeaderValue(int code, string agent, string text, DateTimeOffset? date)
52public WarningHeaderValue(int code, string agent, string text, DateTimeOffset date)
172if (!TryReadDate(input, ref current, out DateTimeOffset? date))
239private static bool TryReadDate(string input, ref int current, out DateTimeOffset? date)
266if (!HttpDateParser.TryParse(input.AsSpan(dateStartIndex, current - dateStartIndex), out DateTimeOffset temp))
System.Net.Mail (1)
System.Net.Quic (1)
System.Net.Requests (5)
System.Net.Security (16)
System.Private.CoreLib (196)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.cs (4)
38if (!TryParseDateTimeOffsetR(source, NoFlipCase, out DateTimeOffset dateTimeOffset, out bytesConsumed))
49if (!TryParseDateTimeOffsetR(source, FlipCase, out DateTimeOffset dateTimeOffset, out bytesConsumed))
67if (!TryParseDateTimeOffsetO(source, out DateTimeOffset dateTimeOffset, out bytesConsumed, out DateTimeKind kind))
121public static bool TryParse(ReadOnlySpan<byte> source, out DateTimeOffset value, out int bytesConsumed, char standardFormat = default)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.Helpers.cs (3)
14private static bool TryCreateDateTimeOffset(DateTime dateTime, bool offsetNegative, int offsetHours, int offsetMinutes, out DateTimeOffset value)
58private static bool TryCreateDateTimeOffset(int year, int month, int day, int hour, int minute, int second, int fraction, bool offsetNegative, int offsetHours, int offsetMinutes, out DateTimeOffset value)
78private static bool TryCreateDateTimeOffsetInterpretingDataAsLocalTime(int year, int month, int day, int hour, int minute, int second, int fraction, out DateTimeOffset value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (92)
41IComparable<DateTimeOffset>,
42IEquatable<DateTimeOffset>,
45ISpanParsable<DateTimeOffset>,
61public static readonly DateTimeOffset MinValue;
62public static readonly DateTimeOffset MaxValue = new DateTimeOffset(0, DateTime.CreateUnchecked(DateTime.MaxTicks));
63public static readonly DateTimeOffset UnixEpoch = new DateTimeOffset(0, DateTime.CreateUnchecked(DateTime.UnixEpochTicks));
85private static DateTimeOffset CreateValidateOffset(DateTime dateTime, TimeSpan offset) => new DateTimeOffset(ValidateOffset(offset), ValidateDate(dateTime, offset));
129/// Initializes a new instance of the <see cref="DateTimeOffset"/> structure by <paramref name="date"/>, <paramref name="time"/> and <paramref name="offset"/>.
159DateTimeOffset value = new(year, month, day, hour, minute, 59, offset);
194DateTimeOffset value = new DateTimeOffset(year, month, day, hour, minute, 59, millisecond, calendar, offset);
200/// Initializes a new instance of the <see cref="DateTimeOffset"/> structure using the
218/// in the Gregorian calendar. To instantiate a <see cref="DateTimeOffset"/> value by using the year, month and day in another calendar, call
259/// Initializes a new instance of the <see cref="DateTimeOffset"/> structure using the
275/// in the Gregorian calendar. To instantiate a <see cref="DateTimeOffset"/> value by using the year, month and day in another calendar, call
332public static DateTimeOffset UtcNow => new DateTimeOffset(0, DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Unspecified));
342public DateTimeOffset ToOffset(TimeSpan offset) => CreateValidateOffset(_dateTime + offset, offset);
385/// Gets the microsecond component of the time represented by the current <see cref="DateTimeOffset"/> object.
395/// Gets the nanosecond component of the time represented by the current <see cref="DateTimeOffset"/> object.
447public DateTimeOffset Add(TimeSpan timeSpan) => Add(ClockDateTime.Add(timeSpan));
455public DateTimeOffset AddDays(double days) => Add(ClockDateTime.AddDays(days));
463public DateTimeOffset AddHours(double hours) => Add(ClockDateTime.AddHours(hours));
471public DateTimeOffset AddMilliseconds(double milliseconds) => Add(ClockDateTime.AddMilliseconds(milliseconds));
474/// Returns a new <see cref="DateTimeOffset"/> object that adds a specified number of microseconds to the value of this instance.
478/// An object whose value is the sum of the date and time represented by the current <see cref="DateTimeOffset"/> object and the number
486/// Because a <see cref="DateTimeOffset"/> object does not represent the date and time in a specific time zone,
491/// The resulting <see cref="DateTimeOffset"/> value is less than <see cref="MinValue"/>
495/// The resulting <see cref="DateTimeOffset"/> value is greater than <see cref="MaxValue"/>
497public DateTimeOffset AddMicroseconds(double microseconds) => Add(ClockDateTime.AddMicroseconds(microseconds));
505public DateTimeOffset AddMinutes(double minutes) => Add(ClockDateTime.AddMinutes(minutes));
507public DateTimeOffset AddMonths(int months) => Add(ClockDateTime.AddMonths(months));
515public DateTimeOffset AddSeconds(double seconds) => Add(ClockDateTime.AddSeconds(seconds));
521public DateTimeOffset AddTicks(long ticks) => Add(ClockDateTime.AddTicks(ticks));
531public DateTimeOffset AddYears(int years) => Add(ClockDateTime.AddYears(years));
533private DateTimeOffset Add(DateTime dateTime) => new DateTimeOffset(_offsetMinutes, ValidateDate(dateTime, Offset));
538public static int Compare(DateTimeOffset first, DateTimeOffset second) =>
549if (obj is not DateTimeOffset other)
557public int CompareTo(DateTimeOffset other) =>
566obj is DateTimeOffset && UtcTicks == ((DateTimeOffset)obj).UtcTicks;
568public bool Equals(DateTimeOffset other) => UtcTicks == other.UtcTicks;
571public bool EqualsExact(DateTimeOffset other) => UtcTicks == other.UtcTicks && _offsetMinutes == other._offsetMinutes;
577public static bool Equals(DateTimeOffset first, DateTimeOffset second) => first.UtcTicks == second.UtcTicks;
583public static DateTimeOffset FromFileTime(long fileTime) =>
586public static DateTimeOffset FromUnixTimeSeconds(long seconds)
597public static DateTimeOffset FromUnixTimeMilliseconds(long milliseconds)
650public static DateTimeOffset Parse(string input)
665public static DateTimeOffset Parse(string input, IFormatProvider? formatProvider)
668public static DateTimeOffset Parse(string input, IFormatProvider? formatProvider, DateTimeStyles styles)
680public static DateTimeOffset Parse(ReadOnlySpan<char> input, IFormatProvider? formatProvider = null, DateTimeStyles styles = DateTimeStyles.None)
691public static DateTimeOffset ParseExact(string input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, IFormatProvider? formatProvider)
698public static DateTimeOffset ParseExact(string input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, IFormatProvider? formatProvider, DateTimeStyles styles)
712public static DateTimeOffset ParseExact(ReadOnlySpan<char> input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] ReadOnlySpan<char> format, IFormatProvider? formatProvider, DateTimeStyles styles = DateTimeStyles.None)
719public static DateTimeOffset ParseExact(string input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string[] formats, IFormatProvider? formatProvider, DateTimeStyles styles)
732public static DateTimeOffset ParseExact(ReadOnlySpan<char> input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string[] formats, IFormatProvider? formatProvider, DateTimeStyles styles = DateTimeStyles.None)
739public TimeSpan Subtract(DateTimeOffset value) => new TimeSpan(UtcTicks - value.UtcTicks);
741public DateTimeOffset Subtract(TimeSpan value) => Add(ClockDateTime.Subtract(value));
775public DateTimeOffset ToLocalTime() => ToLocalTime(UtcDateTime, false);
777private static DateTimeOffset ToLocalTime(DateTime utcDateTime, bool throwOnOverflow)
811public DateTimeOffset ToUniversalTime() => new DateTimeOffset(0, _dateTime);
813public static bool TryParse([NotNullWhen(true)] string? input, out DateTimeOffset result)
824public static bool TryParse(ReadOnlySpan<char> input, out DateTimeOffset result)
831public static bool TryParse([NotNullWhen(true)] string? input, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
849public static bool TryParse(ReadOnlySpan<char> input, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
858out DateTimeOffset result)
878ReadOnlySpan<char> input, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] ReadOnlySpan<char> format, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
887out DateTimeOffset result)
907ReadOnlySpan<char> input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string?[]? formats, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
976public static implicit operator DateTimeOffset(DateTime dateTime) =>
979public static DateTimeOffset operator +(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) =>
982public static DateTimeOffset operator -(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) =>
985public static TimeSpan operator -(DateTimeOffset left, DateTimeOffset right) =>
988public static bool operator ==(DateTimeOffset left, DateTimeOffset right) =>
991public static bool operator !=(DateTimeOffset left, DateTimeOffset right) =>
995public static bool operator <(DateTimeOffset left, DateTimeOffset right) =>
999public static bool operator <=(DateTimeOffset left, DateTimeOffset right) =>
1003public static bool operator >(DateTimeOffset left, DateTimeOffset right) =>
1007public static bool operator >=(DateTimeOffset left, DateTimeOffset right) =>
1011/// Deconstructs <see cref="DateTimeOffset"/> into <see cref="DateOnly"/>, <see cref="TimeOnly"/> and <see cref="TimeSpan"/>.
1034public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out DateTimeOffset result) => TryParse(s, provider, DateTimeStyles.None, out result);
1041public static DateTimeOffset Parse(ReadOnlySpan<char> s, IFormatProvider? provider) => Parse(s, provider, DateTimeStyles.None);
1044public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DateTimeOffset result) => TryParse(s, provider, DateTimeStyles.None, out result);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (20)
291internal DateTimeOffset GetCreationTime(ReadOnlySpan<char> path, bool continueOnError = false)
294internal DateTimeOffset GetCreationTime(SafeFileHandle handle, bool continueOnError = false)
297private DateTimeOffset GetCreationTime(SafeFileHandle? handle, ReadOnlySpan<char> path, bool continueOnError = false)
315internal DateTimeOffset GetLastAccessTime(ReadOnlySpan<char> path, bool continueOnError = false)
318internal DateTimeOffset GetLastAccessTime(SafeFileHandle handle, bool continueOnError = false)
321private DateTimeOffset GetLastAccessTime(SafeFileHandle? handle, ReadOnlySpan<char> path, bool continueOnError = false)
331internal void SetLastAccessTime(string path, DateTimeOffset time, bool asDirectory)
334internal void SetLastAccessTime(SafeFileHandle handle, DateTimeOffset time, bool asDirectory)
337private void SetLastAccessTime(SafeFileHandle? handle, string? path, DateTimeOffset time, bool asDirectory)
340internal DateTimeOffset GetLastWriteTime(ReadOnlySpan<char> path, bool continueOnError = false)
343internal DateTimeOffset GetLastWriteTime(SafeFileHandle handle, bool continueOnError = false)
346private DateTimeOffset GetLastWriteTime(SafeFileHandle? handle, ReadOnlySpan<char> path, bool continueOnError = false)
356internal void SetLastWriteTime(string path, DateTimeOffset time, bool asDirectory)
359internal void SetLastWriteTime(SafeFileHandle handle, DateTimeOffset time, bool asDirectory)
362internal void SetLastWriteTime(SafeFileHandle? handle, string? path, DateTimeOffset time, bool asDirectory)
365private static DateTimeOffset UnixTimeToDateTimeOffset(long seconds, long nanoseconds)
367return DateTimeOffset.FromUnixTimeSeconds(seconds).AddTicks(nanoseconds / NanosecondsPerTick);
370private unsafe void SetAccessOrWriteTimeCore(SafeFileHandle? handle, string? path, DateTimeOffset time, bool isAccessTime, bool checkCreationTime, bool asDirectory)
576private static long UnixTimeSecondsToNanoseconds(DateTimeOffset time, long seconds)
578return (time.UtcDateTime.Ticks - DateTimeOffset.UnixEpoch.Ticks - seconds * TimeSpan.TicksPerSecond) * NanosecondsPerTick;
System.Private.DataContractSerialization (9)
System.Private.Windows.Core (31)
System.Private.Xml (136)
System\Xml\Schema\XmlValueConverter.cs (72)
195public abstract DateTime ToDateTime(DateTimeOffset value);
198public abstract DateTimeOffset ToDateTimeOffset(DateTime value);
199public abstract DateTimeOffset ToDateTimeOffset(string value);
200public abstract DateTimeOffset ToDateTimeOffset(object value);
209public abstract string ToString(DateTimeOffset value);
322protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset);
337public override DateTime ToDateTime(DateTimeOffset value) { return (DateTime)ChangeType((object)value, DateTimeType, null); }
343public override DateTimeOffset ToDateTimeOffset(DateTime value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
344public override DateTimeOffset ToDateTimeOffset(string value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
345public override DateTimeOffset ToDateTimeOffset(object value) { return (DateTimeOffset)ChangeType((object)value, DateTimeOffsetType, null); }
375public override string ToString(DateTimeOffset value) { return (string)ChangeType((object)value, StringType, null); }
573protected static DateTimeOffset StringToDateOffset(string value)
575return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Date));
578protected static DateTimeOffset StringToDateTimeOffset(string value)
580return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.DateTime));
583protected static DateTimeOffset StringToGDayOffset(string value)
585return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GDay));
588protected static DateTimeOffset StringToGMonthOffset(string value)
590return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonth));
593protected static DateTimeOffset StringToGMonthDayOffset(string value)
595return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonthDay));
598protected static DateTimeOffset StringToGYearOffset(string value)
600return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYear));
603protected static DateTimeOffset StringToGYearMonthOffset(string value)
605return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYearMonth));
655protected static DateTimeOffset StringToTimeOffset(string value)
657return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Time));
726protected static string DateOffsetToString(DateTimeOffset value)
731protected static string DateTimeOffsetToString(DateTimeOffset value)
736protected static string GDayOffsetToString(DateTimeOffset value)
741protected static string GMonthOffsetToString(DateTimeOffset value)
746protected static string GMonthDayOffsetToString(DateTimeOffset value)
751protected static string GYearOffsetToString(DateTimeOffset value)
756protected static string GYearMonthOffsetToString(DateTimeOffset value)
780protected static string TimeOffsetToString(DateTimeOffset value)
795internal static DateTime DateTimeOffsetToDateTime(DateTimeOffset value)
877protected static DateTimeOffset UntypedAtomicToDateTimeOffset(string value)
879return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.AllXsd));
1333public override DateTime ToDateTime(DateTimeOffset value)
1361if (sourceType == DateTimeOffsetType) return this.ToDateTime((DateTimeOffset)value);
1372public override DateTimeOffset ToDateTimeOffset(DateTime value)
1377public override DateTimeOffset ToDateTimeOffset(string value)
1394public override DateTimeOffset ToDateTimeOffset(object value)
1401if (sourceType == DateTimeOffsetType) return ((DateTimeOffset)value);
1403if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue)value).ValueAsDateTime;
1405return (DateTimeOffset)ChangeListType(value, DateTimeOffsetType, null);
1460public override string ToString(DateTimeOffset value) =>
1463XmlTypeCode.Date => DateOffsetToString((DateTimeOffset)value),
1464XmlTypeCode.Time => TimeOffsetToString((DateTimeOffset)value),
1465XmlTypeCode.GDay => GDayOffsetToString((DateTimeOffset)value),
1466XmlTypeCode.GMonth => GMonthOffsetToString((DateTimeOffset)value),
1467XmlTypeCode.GMonthDay => GMonthDayOffsetToString((DateTimeOffset)value),
1468XmlTypeCode.GYear => GYearOffsetToString((DateTimeOffset)value),
1469XmlTypeCode.GYearMonth => GYearMonthOffsetToString((DateTimeOffset)value),
1470_ => DateTimeOffsetToString((DateTimeOffset)value),
1480if (sourceType == DateTimeOffsetType) return this.ToString((DateTimeOffset)value);
1535if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType!, (DateTimeOffset)value));
1542if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType!, (DateTimeOffset)value));
2069public override DateTimeOffset ToDateTimeOffset(string value)
2076public override DateTimeOffset ToDateTimeOffset(object value)
2084return (DateTimeOffset)ChangeTypeWildcardDestination(value, DateTimeOffsetType, null);
2209public override string ToString(DateTimeOffset value)
2211return DateTimeOffsetToString((DateTimeOffset)value);
2243if (sourceType == DateTimeOffsetType) return DateTimeOffsetToString((DateTimeOffset)value);
2575public override DateTimeOffset ToDateTimeOffset(object value)
2581if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue)value).ValueAs(DateTimeOffsetType);
2583return (DateTimeOffset)ChangeTypeWildcardDestination(value, DateTimeOffsetType, null);
2796if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime), (DateTimeOffset)value));
2986if (itemTypeDst == DateTimeOffsetType) return ToArray<DateTimeOffset>(value, nsResolver);
System\Xml\XmlConvert.cs (11)
729public static string ToString(DateTimeOffset value)
735public static string ToString(DateTimeOffset value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format)
1238public static DateTimeOffset ToDateTimeOffset(string s)
1243DateTimeOffset dateTimeOffset = (DateTimeOffset)xsdDateTime;
1247public static DateTimeOffset ToDateTimeOffset(string s, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format)
1251return DateTimeOffset.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1254public static DateTimeOffset ToDateTimeOffset(string s, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string[] formats)
1258return DateTimeOffset.ParseExact(s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1791internal static bool TryFormat(DateTimeOffset value, Span<char> destination, out int charsWritten)
1797internal static bool TryFormat(DateTimeOffset value, [StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string format, Span<char> destination, out int charsWritten)
System.Private.Xml.Linq (20)
System.Reflection.Metadata (1)
System.Runtime (1)
System.Runtime.Caching (23)
System.Runtime.InteropServices.JavaScript (13)
System.Security.Cryptography (41)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (15)
661/// Typically <see cref="DateTimeOffset.UtcNow"/>, plus or minus a few seconds.
679public unsafe X509Certificate2 CreateSelfSigned(DateTimeOffset notBefore, DateTimeOffset notAfter)
724/// Typically <see cref="DateTimeOffset.UtcNow"/>, plus or minus a few seconds.
764DateTimeOffset notBefore,
765DateTimeOffset notAfter,
782/// Typically <see cref="DateTimeOffset.UtcNow"/>, plus or minus a few seconds.
822DateTimeOffset notBefore,
823DateTimeOffset notAfter,
937/// Typically <see cref="DateTimeOffset.UtcNow"/>, plus or minus a few seconds.
964DateTimeOffset notBefore,
965DateTimeOffset notAfter,
982/// Typically <see cref="DateTimeOffset.UtcNow"/>, plus or minus a few seconds.
1009DateTimeOffset notBefore,
1010DateTimeOffset notAfter,
System.Security.Cryptography.Pkcs (7)
System.ServiceModel.Http (2)
System.ServiceModel.Primitives.Tests (2)
System.ServiceModel.Syndication (40)
System\ServiceModel\Syndication\DateTimeHelper.cs (10)
13public static bool DefaultRss20DateTimeParser(XmlDateTimeData XmlDateTimeData, out DateTimeOffset dateTimeOffset)
18if (DateTimeOffset.TryParse(dateTimeString, out dateTimeOffset))
38public static bool DefaultAtom10DateTimeParser(XmlDateTimeData XmlDateTimeData, out DateTimeOffset dateTimeOffset)
43private static bool Rfc3339DateTimeParser(string dateTimeString, out DateTimeOffset dto)
45dto = default(DateTimeOffset);
68return DateTimeOffset.TryParseExact(dateTimeString, Rfc3339DateTimeFormat, CultureInfo.InvariantCulture.DateTimeFormat, DateTimeStyles.None, out dto);
71private static bool Rfc822DateTimeParser(string dateTimeString, out DateTimeOffset dto)
73dto = default(DateTimeOffset);
92DateTimeOffset theTime;
119if (DateTimeOffset.TryParseExact(wellFormattedString, parseFormat,
System\ServiceModel\Syndication\SyndicationFeed.cs (5)
27private DateTimeOffset _lastUpdatedTime;
44: this(title, description, feedAlternateLink, null, DateTimeOffset.MinValue, items)
48public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime)
53public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable<SyndicationItem> items)
152public DateTimeOffset LastUpdatedTime
System\ServiceModel\Syndication\SyndicationItem.cs (7)
19private DateTimeOffset _lastUpdatedTime;
21private DateTimeOffset _publishDate;
28: this(title, content, itemAlternateLink, null, DateTimeOffset.MinValue)
32public SyndicationItem(string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime)
37public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime)
105public DateTimeOffset LastUpdatedTime
130public DateTimeOffset PublishDate
System.Text.Json (91)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (23)
13/// Writes the pre-encoded property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
21/// Writes the <see cref="DateTimeOffset"/> using the round-trippable ('O') <see cref="StandardFormat"/> , for example: 2017-06-12T05:30:45.7680000-07:00.
23public void WriteString(JsonEncodedText propertyName, DateTimeOffset value)
35/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
49/// Writes the <see cref="DateTimeOffset"/> using the round-trippable ('O') <see cref="StandardFormat"/> , for example: 2017-06-12T05:30:45.7680000-07:00.
52public void WriteString(string propertyName, DateTimeOffset value)
59/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
70/// Writes the <see cref="DateTimeOffset"/> using the round-trippable ('O') <see cref="StandardFormat"/> , for example: 2017-06-12T05:30:45.7680000-07:00.
73public void WriteString(ReadOnlySpan<char> propertyName, DateTimeOffset value)
84/// Writes the property name and <see cref="DateTimeOffset"/> value (as a JSON string) as part of a name/value pair of a JSON object.
95/// Writes the <see cref="DateTimeOffset"/> using the round-trippable ('O') <see cref="StandardFormat"/> , for example: 2017-06-12T05:30:45.7680000-07:00.
98public void WriteString(ReadOnlySpan<byte> utf8PropertyName, DateTimeOffset value)
108private void WriteStringEscape(ReadOnlySpan<char> propertyName, DateTimeOffset value)
124private void WriteStringEscape(ReadOnlySpan<byte> utf8PropertyName, DateTimeOffset value)
140private unsafe void WriteStringEscapeProperty(ReadOnlySpan<char> propertyName, DateTimeOffset value, int firstEscapeIndexProp)
163private unsafe void WriteStringEscapeProperty(ReadOnlySpan<byte> utf8PropertyName, DateTimeOffset value, int firstEscapeIndexProp)
186private void WriteStringByOptions(ReadOnlySpan<char> propertyName, DateTimeOffset value)
199private void WriteStringByOptions(ReadOnlySpan<byte> utf8PropertyName, DateTimeOffset value)
212private void WriteStringMinimized(ReadOnlySpan<char> escapedPropertyName, DateTimeOffset value)
246private void WriteStringMinimized(ReadOnlySpan<byte> escapedPropertyName, DateTimeOffset value)
280private void WriteStringIndented(ReadOnlySpan<char> escapedPropertyName, DateTimeOffset value)
329private void WriteStringIndented(ReadOnlySpan<byte> escapedPropertyName, DateTimeOffset value)
378internal unsafe void WritePropertyName(DateTimeOffset value)
System.Text.Json.SourceGeneration (1)
System.Xaml (4)
TestProject.WorkerA (1)
vbc (1)
VBCSCompiler (30)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (19)
332File.WriteAllText(Path.Combine(stagingDir, CreatedFileName), DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
458File.WriteAllText(path, DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
473internal static string PurgeEntries(string cachePath, DateTimeOffset cutoff, ICompilerServerLogger logger)
500var lastUsed = GetLastUsedTimeUtc(entryDir, logger);
551internal static DateTimeOffset GetLastUsedTimeUtc(string entryDir, ICompilerServerLogger logger)
559if (DateTimeOffset.TryParse(text, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out var parsed))
579internal static DateTimeOffset GetCreatedTimeUtc(string entryDir, ICompilerServerLogger logger)
587if (DateTimeOffset.TryParse(text, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out var parsed))
609internal static CacheStats GetCacheStats(string cachePath, DateTimeOffset since, ICompilerServerLogger logger)
631var created = GetCreatedTimeUtc(entryDir, logger);
632var lastUsed = GetLastUsedTimeUtc(entryDir, logger);
669public List<(string DllName, string HashKey, DateTimeOffset Created, DateTimeOffset LastUsed)> HitDetails { get; } = new();
670public List<(string DllName, string HashKey, DateTimeOffset Created, DateTimeOffset LastUsed)> StoreDetails { get; } = new();
693private static void FormatGrouped(StringBuilder sb, string label, List<(string DllName, string HashKey, DateTimeOffset Created, DateTimeOffset LastUsed)> details, int verbosity)
vstest.console (2)
vstest.console.arm64 (2)