587 references to Now
Aspire.Cli.Tests (3)
Hosting\CliOrphanDetectorTests.cs (3)
54var expectedStartTime = DateTime.Now.AddMinutes(-5); 98var expectedStartTime = DateTime.Now.AddMinutes(-5); 142var expectedStartTime = DateTime.Now.AddMinutes(-5);
Aspire.Dashboard (1)
Utils\FormatHelpers.cs (1)
114if (local.Date == DateTime.Now.Date)
Aspire.Dashboard.Tests (11)
Integration\DashboardClientAuthTests.cs (1)
183Resources = { new Resource() { Name = "resource1", ResourceType = "test", Uid = "resource1", CreatedAt = Timestamp.FromDateTime(DateTime.Now) } }
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (10)
68CreateLogRecord(time: DateTime.Now, message: "1", severity: SeverityNumber.Error), 91CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(1)), 92CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(2)), 93CreateSumMetric(metricName: "test2", startTime: DateTime.Now.AddMinutes(1)), 101CreateSumMetric(metricName: "test", startTime: DateTime.Now.AddMinutes(1)), 102CreateHistogramMetric(metricName: "test2", startTime: DateTime.Now.AddMinutes(1)) 125CreateSpan(traceId: "1", spanId: "1-1", startTime: DateTime.Now.AddMinutes(1), endTime: DateTime.Now.AddMinutes(10)), 126CreateSpan(traceId: "1", spanId: "1-2", startTime: DateTime.Now.AddMinutes(5), endTime: DateTime.Now.AddMinutes(10), parentSpanId: "1-1")
Aspire.Hosting.Tests (1)
ResourceNotificationTests.cs (1)
387var createdDate = DateTime.Now;
AuthSamples.FunctionalTests (4)
CustomPolicyProviderTests.cs (4)
51var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 67var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 5)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 82var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 55)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture)); 98var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
AzureContainerApps.ApiService (1)
Program.cs (1)
76return await connection.GetDatabase().StringSetAsync("Key", $"{DateTime.Now}");
ClaimsTransformation (1)
ClaimsTransformer.cs (1)
21new Claim("Transformed", DateTime.Now.ToString(CultureInfo.InvariantCulture))
Client.ExpectedExceptions.IntegrationTests (12)
ExpectedExceptionTests.4.0.0.cs (6)
247DateTime endOfOpeningStall = DateTime.Now; 267DateTime startOfOpeningStall = DateTime.Now; 270endOfOpeningStall = DateTime.Now; 284endOfOpeningStall = DateTime.Now; 325DateTime startTime = DateTime.Now; 344double elapsedMs = (DateTime.Now - endOfOpeningStall).TotalMilliseconds;
ExpectedExceptionTests.4.1.0.cs (6)
497DateTime endOfOpeningStall = DateTime.Now; 517DateTime startOfOpeningStall = DateTime.Now; 520endOfOpeningStall = DateTime.Now; 534endOfOpeningStall = DateTime.Now; 575DateTime startTime = DateTime.Now; 594double elapsedMs = (DateTime.Now - endOfOpeningStall).TotalMilliseconds;
Contract.Message.IntegrationTests (2)
MessageContractCommon.4.1.0.cs (1)
53transaction.transactionDate = DateTime.Now;
MessageContractTests.4.4.0.cs (1)
31requestData.transactionDate = DateTime.Now;
Contract.XmlSerializer.IntegrationTests (6)
XmlSerializerFormatTest.cs (6)
176var dateTime = DateTime.Now; 224var dateTime = DateTime.Now; 272var dateTime = DateTime.Now; 324var dateTime = DateTime.Now; 381var dateTime = DateTime.Now; 438var dateTime = DateTime.Now;
CustomPolicyProvider (2)
Authorization\MinimumAgeAuthorizationHandler.cs (2)
37var age = DateTime.Now.Year - dateOfBirth.Year; 38if (dateOfBirth > DateTime.Now.AddYears(-age))
Deployers.ApiService (1)
Program.cs (1)
17DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
dotnet-svcutil.xmlserializer.IntegrationTests (6)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (6)
176var dateTime = DateTime.Now; 224var dateTime = DateTime.Now; 272var dateTime = DateTime.Now; 324var dateTime = DateTime.Now; 381var dateTime = DateTime.Now; 438var dateTime = DateTime.Now;
dotnet-svcutil-lib (8)
CommandProcessorOptions.cs (1)
576var sessionDirName = DateTime.Now.ToString("yyyy_MMM_dd_HH_mm_ss", CultureInfo.InvariantCulture);
DebugLogger.cs (1)
80var startTime = DateTime.Now;
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (4)
409result = new DateTime(DateTime.Now.Year, xdt.Month, xdt.Day); 413DateTime currentDateTime = DateTime.Now; 469dt = new DateTime(DateTime.Now.Year, xdt.Month, xdt.Day); 473DateTime currentDateTime = DateTime.Now;
Shared\Utilities\SafeLogger.cs (2)
31return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] Time elapsed: {DateTime.Now - startTime}"; 75return Task.FromResult(DateTime.Now);
dotnet-svcutil-lib.Tests (1)
TestLogger.cs (1)
50return Task.FromResult(DateTime.Now);
HostedBlazorWebassemblyApp.Server (1)
Controllers\WeatherForecastController.cs (1)
28return _forecastService.GetForecastAsync(DateTime.Now);
HttpStress (1)
Program.cs (1)
547Console.Write("[" + DateTime.Now + "]");
IdeCoreBenchmarks (28)
ClassificationBenchmarks.cs (2)
78var start = DateTime.Now; 80Console.WriteLine("Finished opening roslyn: " + (DateTime.Now - start));
FindReferencesBenchmarks.cs (6)
77var start = DateTime.Now; 79Console.WriteLine("Finished opening roslyn: " + (DateTime.Now - start)); 95start = DateTime.Now; 97Console.WriteLine("Time to get first compilation: " + (DateTime.Now - start)); 107var start = DateTime.Now; 109Console.WriteLine("Time to find-refs: " + (DateTime.Now - start));
IncrementalSourceGeneratorBenchmarks.cs (8)
79var start = DateTime.Now; 82Console.WriteLine("Finished opening roslyn: " + (DateTime.Now - start)); 141var start = DateTime.Now; 144Console.WriteLine("Compilation time: " + (DateTime.Now - start)); 147start = DateTime.Now; 150Console.WriteLine("First generator run: " + (DateTime.Now - start)); 167start = DateTime.Now; 169var incrementalTime = DateTime.Now - start;
NavigateToBenchmarks.cs (12)
80var start = DateTime.Now; 83Console.WriteLine("Finished opening roslyn: " + (DateTime.Now - start)); 107var start = DateTime.Now; 118Console.WriteLine("Serial: " + (DateTime.Now - start)); 142var start = DateTime.Now; 151Console.WriteLine("Serial: " + (DateTime.Now - start)); 161var start = DateTime.Now; 172Console.WriteLine("Project parallel: " + (DateTime.Now - start)); 187var start = DateTime.Now; 200Console.WriteLine("Solution parallel: " + (DateTime.Now - start)); 211var start = DateTime.Now; 221Console.WriteLine("Time to search: " + (DateTime.Now - start));
JwtClientSample (1)
Program.cs (1)
71await hubConnection.SendAsync("Broadcast", userId, $"Hello at {DateTime.Now}");
Keycloak.ApiService (1)
Program.cs (1)
33DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
LocalizationSample (6)
Startup.cs (6)
94await context.Response.WriteAsync($"<tr><th>{SR["Current date (invariant full):"]}</th><td>{DateTime.Now.ToString("F", CultureInfo.InvariantCulture)}</td></tr>"); 95await context.Response.WriteAsync($"<tr><th>{SR["Current date (invariant):"]}</th><td>{DateTime.Now.ToString(CultureInfo.InvariantCulture)}</td></tr>"); 96await context.Response.WriteAsync($"<tr><th>{SR["Current date (request full):"]}</th><td>{DateTime.Now.ToString("F", CultureInfo.CurrentCulture)}</td></tr>"); 97await context.Response.WriteAsync($"<tr><th>{SR["Current date (request):"]}</th><td>{DateTime.Now.ToString(CultureInfo.CurrentCulture)}</td></tr>"); 98await context.Response.WriteAsync($"<tr><th>{SR["Current time (invariant):"]}</th><td>{DateTime.Now.ToString("T", CultureInfo.InvariantCulture)}</td></tr>"); 99await context.Response.WriteAsync($"<tr><th>{SR["Current time (request):"]}</th><td>{DateTime.Now.ToString("T", CultureInfo.CurrentCulture)}</td></tr>");
Microsoft.Analyzers.Local.Tests (2)
Json\JsonValueTest.cs (2)
73Assert.True(new JsonValue(DateTime.Now.ToString("o", CultureInfo.InvariantCulture)).IsDateTime); 209DateTime time = DateTime.Now;
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTests.cs (1)
339app.Run(new[] { "create", "--project", project, "--expires-on", DateTime.Now.AddDays(2).ToString("O") });
Microsoft.AspNetCore.Authentication.Test (10)
JwtBearerTests.cs (5)
61expires: DateTime.Now.AddMinutes(30), 98expires: DateTime.Now.AddMinutes(30), 930notBefore: DateTime.Now.AddMinutes(-10), 931expires: DateTime.Now.AddMinutes(30), 1286expires: DateTime.Now.AddMinutes(30),
JwtBearerTests_Handler.cs (5)
54expires: DateTime.Now.AddMinutes(30), 90expires: DateTime.Now.AddMinutes(30), 876notBefore: DateTime.Now.AddMinutes(-10), 877expires: DateTime.Now.AddMinutes(30), 1354expires: DateTime.Now.AddMinutes(30),
Microsoft.AspNetCore.Components.Forms.Tests (1)
FieldIdentifierTest.cs (1)
22var ex = Assert.Throws<ArgumentException>(() => new FieldIdentifier(DateTime.Now, "somefield"));
Microsoft.AspNetCore.Components.Tests (11)
BindConverterTest.cs (6)
161var value = DateTime.Now; 175var value = DateTime.Now; 189var value = DateOnly.FromDateTime(DateTime.Now); 203var value = DateOnly.FromDateTime(DateTime.Now); 217var value = TimeOnly.FromDateTime(DateTime.Now); 231var value = TimeOnly.FromDateTime(DateTime.Now);
EventCallbackFactoryBinderExtensionsTest.cs (4)
387var value = DateTime.Now; 406var value = (DateTime?)DateTime.Now; 425var value = DateTime.Now; 445var value = (DateTime?)DateTime.Now;
RenderTreeDiffBuilderTest.cs (1)
1738var dateTimeWillNotChange = DateTime.Now;
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
305var now = DateTime.Now; 357var now = DateTime.Now;
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
110var now = DateTime.Now;
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
20var now = DateTime.Now;
Microsoft.AspNetCore.HttpLogging (1)
SystemDateTime.cs (1)
8public DateTime Now => DateTime.Now;
Microsoft.AspNetCore.Identity.Specification.Tests (1)
UserManagerSpecificationTests.cs (1)
1336var lockoutEnd = new DateTimeOffset(DateTime.Now.AddMinutes(30).ToLocalTime());
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
AntiforgeryMiddlewareTest.cs (1)
250public DateTime DueDate { get; set; } = DateTime.Now.Add(TimeSpan.FromDays(1));
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
GenerationBenchmarks.cs (1)
34_builder.MapGet($"/{i}", (int i) => new Todo(1, "Write benchmarks", false, DateTime.Now));
Microsoft.AspNetCore.OpenApi.Tests (59)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (1)
194builder.MapGet("/api/todos", [Produces("application/json", "application/xml")] () => new Todo(1, "Test todo", false, DateTime.Now));
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (18)
61builder.MapGet("/api", () => new Todo(1, "Test Title", true, DateTime.Now)); 173static Todo? GetTodo() => Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null; 234static Task<Todo?> GetTodoAsync() => Task.FromResult(Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null); 281static ValueTask<Todo?> GetTodoValueTaskAsync() => ValueTask.FromResult(Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null); 440[new Todo(1, "Test", true, DateTime.Now)] : null; 442[new Todo(1, "Test", true, DateTime.Now)] : null; 444[new Todo(1, "Test", true, DateTime.Now)] : null; 557builder.MapGet("/api", () => new TodoWithDueDate(1, "Test Title", true, DateTime.Now, DateTime.Now.AddDays(1))); 611builder.MapGet("/api", () => new Result<Todo>(true, new TodoWithDueDate(1, "Test Title", true, DateTime.Now, DateTime.Now.AddDays(1)), null)); 719builder.MapGet("/api", () => TypedResults.Created("/test/1", new { Id = 1, Name = "Test", Todo = new Todo(1, "Test", true, DateTime.Now) })); 781builder.MapGet("/", () => TypedResults.Ok<List<Todo>>([new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)])); 828builder.MapGet("/", () => TypedResults.Ok<PaginatedItems<Todo>>(new(0, 1, 5, 50, [new Todo(1, "Test Title", true, DateTime.Now), new Todo(2, "Test Title 2", false, DateTime.Now)]))); 968builder.MapGet("/", () => new ClassWithObjectProperty { Object = new Todo(1, "Test Title", true, DateTime.Now) }); 1040internal Todo Get() => new(1, "Write test", false, DateTime.Now);
Transformers\CustomSchemaTransformerTests.cs (1)
84builder.MapGet("/api", () => TypedResults.Ok(new Todo(1, "Task", false, DateTime.Now)));
Transformers\DocumentTransformerTests.cs (3)
168builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 196builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 223builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
278builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\OperationTransformerTests.cs (4)
406builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 433builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 460builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 461builder.MapGet("/todo-2", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\SchemaTransformerTests.cs (18)
74builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 111builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 129builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 182builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 213builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 243builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 266builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 290builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 328builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 365builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 391builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 527builder.MapGet("/list-of-todo", () => new List<Todo> { new Todo(1, "Item1", false, DateTime.Now) }); 723builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 781builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 808builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 835builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 861builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 900builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Transformers\TypeBasedTransformerLifetimeTests.cs (13)
16builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 38builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 64builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 90builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 115builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 137builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 162builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 188builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 213builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 234builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 257builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 283builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now)); 309builder.MapGet("/todo", () => new Todo(1, "Item1", false, DateTime.Now));
Microsoft.AspNetCore.Routing.Tests (1)
Constraints\DateTimeRouteConstraintTests.cs (1)
16DateTime.Now,
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Startup.cs (1)
137var token = new JwtSecurityToken("SignalRTestServer", "SignalRTests", claims, expires: DateTime.Now.AddSeconds(5), signingCredentials: credentials);
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\LogSinkProvider.cs (1)
35DateTime.Now,
Microsoft.AspNetCore.Testing.Tests (2)
FakeCertificateFactoryTests.cs (2)
21Assert.True(DateTime.Now > certificate.NotBefore + TimeSpan.FromHours(1)); 22Assert.True(DateTime.Now < certificate.NotAfter - TimeSpan.FromHours(1));
Microsoft.Build.Framework (1)
LazyFormattedBuildEventArgs.cs (1)
50: this(message, helpKeyword, senderName, DateTime.Now, null)
Microsoft.CodeAnalysis (1)
VersionHelper.cs (1)
182time = DateTime.Now;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProviderTests.cs (8)
1390[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1407[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1425[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1451[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1676[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1696[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1781[InlineData(nameof(DateTime), nameof(DateTime.Now))] 1800[InlineData(nameof(DateTime), nameof(DateTime.Now))]
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
1455Assert.Throws<ArgumentException>(() => VersionStamp.Create(DateTime.Now));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_Assembly.cs (1)
65var now = DateTime.Now;
Semantics\PatternMatchingTests.cs (2)
4908int dt = (int)Math.Abs(DateTime.Now.Ticks % 1000000000); 4921int dt = (int)Math.Abs(DateTime.Now.Ticks % 1000000000);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspWorkspaceManager.cs (1)
397selector: tuple => (tuple.identity!.Value, DateTime.Now, tuple.Text));
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
169File.SetLastWriteTimeUtc(path0, DateTime.Now + TimeSpan.FromHours(1));
Microsoft.CodeAnalysis.UnitTests (5)
Collections\ImmutableSegmentedListTest.cs (3)
45int seed = unchecked((int)DateTime.Now.Ticks); 187int randSeed = unchecked((int)DateTime.Now.Ticks); 216int randSeed = unchecked((int)DateTime.Now.Ticks);
Collections\ImmutablesTestBase.cs (1)
175int seed = unchecked((int)DateTime.Now.Ticks);
VersionHelperTests.cs (1)
40var now = DateTime.Now;
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
332var generationDateTime = DateTime.Now;
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
ObjectSerializationTests.cs (1)
269private static readonly DateTime _testNow = DateTime.Now;
SolutionTests\SolutionWithSourceGeneratorTests.cs (7)
886identity, DateTime.Now, SourceText.From("// Frozen Document")); 913[(sourceGeneratedDocument1.Identity, DateTime.Now, SourceText.From("// Frozen 1")), (sourceGeneratedDocument2.Identity, DateTime.Now, SourceText.From("// Frozen 2"))]); 1274identity, DateTime.Now, SourceText.From("// Frozen Document")); 1311identity, DateTime.Now, SourceText.From("// Frozen Document")); 1342identity, DateTime.Now, SourceText.From("// Frozen Document")); 1377identity, DateTime.Now, SourceText.From("// Frozen Document"));
Microsoft.Data.Analysis.Interactive (1)
DataFrameKernelExtension.cs (1)
42var uniqueId = DateTime.Now.Ticks;
Microsoft.Data.Analysis.Tests (1)
ArrowIntegrationTests.cs (1)
58.Append("Date64Column", false, new Date64Array.Builder().AppendRange(Enumerable.Repeat(DateTime.Now, 10)).Build())
Microsoft.DotNet.Baselines.Tasks (1)
PRCreator.cs (1)
51DateTime startTime = DateTime.Now.ToUniversalTime();
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateChangelogFile.cs (1)
46writer.WriteLine($" -- {MaintainerName} <{MaintainerEmail}> {DateTime.Now:ddd, dd MMM yyyy HH:mm:ss zzz}");
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeHandle.cs (1)
147description.AppendLine($"Timed out at {DateTime.Now} after {Options.TimeOut}ms waiting for remote process.");
Microsoft.DotNet.SignCheckTask (2)
src\SignCheck.cs (2)
406DateTime startTime = DateTime.Now; 408DateTime endTime = DateTime.Now;
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WritePackageUsageData.cs (2)
86DateTime startTime = DateTime.Now; 259$"Writing package usage data... done. Took {DateTime.Now - startTime}");
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
AgentQualityEvaluatorTests.cs (2)
246return new OrderStatus(orderId, "shipped", DateTime.Now.AddDays(1)); 250return new OrderStatus(orderId, "delayed", DateTime.Now.AddDays(10));
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Storage\AzureStorageResponseCacheProvider.cs (1)
33private readonly Func<DateTime> _provideDateTime = () => DateTime.Now;
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
687new CustomAIContent1("Hello", DateTime.Now),
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
TimeExpirationAsyncTests.cs (2)
250var setTime = DateTime.Now; 263while ((DateTime.Now - setTime).TotalSeconds < 4)
TimeExpirationTests.cs (2)
235var setTime = DateTime.Now; 248while ((DateTime.Now - setTime).TotalSeconds < 4)
Microsoft.Extensions.Validation.Tests (2)
ValidatableTypeInfoTests.cs (2)
470CreatedAt = DateTime.Now.AddDays(1) // Invalid: future date 816if (value is DateTime date && date > DateTime.Now)
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
90P0 = DateTime.Now,
Microsoft.ML.Samples (2)
Dynamic\Transforms\Conversion\ConvertTypeMultiColumn.cs (2)
21Feature3 = DateTime.Now, Feature4 = 0.145}, 30Feature3 = DateTime.Now, Feature4 = 0.1206},
Microsoft.ML.Tests (1)
CollectionsDataViewTest.cs (1)
456private DateTime _dateTime = DateTime.Now;
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\DateAndTime.vb (3)
32Return DateTime.Now 38Dim Ticks As Int64 = DateTime.Now.TimeOfDay.Ticks 53Return (New DateTime(DateTime.Now.TimeOfDay.Ticks)).ToString("HH:mm:ss", GetInvariantCultureInfo())
Microsoft.VisualBasic.Forms.Tests (3)
System\Windows\Forms\TimeTests.vb (1)
23Date.Now.Should.BeAfter(New Date)
System\Windows\TestUtilities\TestData\DualTimeZones.vb (2)
16SystemTime = Date.Now 19SystemTime = Date.Now.AddSeconds(1)
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\Devices\ClockTests.cs (1)
16var now = DateTime.Now;
Microsoft.VisualStudio.LanguageServices (2)
Telemetry\FileLogger.cs (2)
50=> DateTime.Now.ToString(CultureInfo.InvariantCulture).Replace(' ', '_').Replace('/', '_').Replace(':', '_') + ".log"; 101buffer.AppendLine($"{DateTime.Now} ({functionId}) : {message}");
MinimalSample (1)
Program.cs (1)
21Date and Time: {DateTime.Now}
MinimalSampleOwin (1)
Program.cs (1)
24Date and Time: {DateTime.Now}
MvcFormSample (1)
Models\Todo.cs (1)
9public DateTime DueDate { get; set; } = DateTime.Now.Add(TimeSpan.FromDays(1));
OutputCachingSample (2)
Gravatar.cs (1)
15await context.Response.WriteAsync($"<pre>Generated at {DateTime.Now:hh:mm:ss.ff}</pre>");
Startup.cs (1)
46app.MapGet("/vary", Gravatar.WriteGravatar).CacheOutput(c => c.VaryByValue((context) => new KeyValuePair<string, string>("time", (DateTime.Now.Second % 2).ToString(CultureInfo.InvariantCulture))));
PresentationBuildTasks (1)
MS\Internal\MarkupCompiler\VersionHelper.cs (1)
193time = DateTime.Now;
PresentationCore (83)
MS\Internal\AppModel\SiteOfOriginContainer.cs (4)
46DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 181DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " +
MS\Internal\AppModel\SiteOfOriginPart.cs (18)
50DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 62DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 90DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 106DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 120DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 133DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 159DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 183DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 193DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " +
System\IO\Packaging\PackWebRequest.cs (6)
81DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 153DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 169DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " +
System\IO\Packaging\PackWebRequestFactory.cs (6)
65DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 104DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 117DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " +
System\IO\Packaging\PackWebResponse.cs (44)
67DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 90DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 100DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 134DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 173DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 195DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 485DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 506DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 519DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 542DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 601DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 618DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 627DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 645DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 658DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 669DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 769DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 791DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 806DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 835DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 877DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " + 892DateTime.Now.ToLongTimeString() + " " + DateTime.Now.Millisecond + " " +
System\Windows\InterOp\HwndTarget.cs (4)
984TimeSpan delta = DateTime.Now - _lastWakeOrUnlockEvent; 1249_lastWakeOrUnlockEvent = DateTime.Now; 1286_lastWakeOrUnlockEvent = DateTime.Now; 1321_lastWakeOrUnlockEvent = DateTime.Now;
System\Windows\Media\Animation\TimeManager.cs (1)
446return TimeSpan.FromTicks(DateTime.Now.Ticks);
PresentationFramework (21)
MS\Internal\Data\DataBindEngine.cs (2)
521long startTime = DateTime.Now.Ticks; // unit = 10^-7 sec 547if (DateTime.Now.Ticks - startTime > CrossThreadThreshold)
MS\Internal\Documents\FlowDocumentPaginator.cs (3)
756DateTime dtStart = DateTime.Now; 796dtStop = DateTime.Now; 810dtStop = DateTime.Now;
MS\Internal\Documents\TextBoxView.cs (2)
2213stopTime = DateTime.Now.AddMilliseconds(_maxMeasureTimeMs); 2239while (!endOfParagraph && DateTime.Now < stopTime);
MS\Internal\Utility\TraceLog.cs (1)
37string s = $"{DateTime.Now.Ticks.ToString(CultureInfo.InvariantCulture)} {String.Format(CultureInfo.InvariantCulture, message, args)}";
System\Windows\Annotations\Annotation.cs (3)
102_created = DateTime.Now; 859_modified = DateTime.Now; 879_modified = DateTime.Now;
System\Windows\Controls\DatePicker.cs (1)
162new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, CoerceDisplayDate));
System\Windows\Controls\VirtualizingStackPanel.cs (3)
12331"Time:", DateTime.Now); 12375AddTrace(null, ScrollTraceOp.ID, _nullInfo, "Inactive at", DateTime.Now); 12391AddTrace(null, ScrollTraceOp.ID, _nullInfo, "Reactivate at", DateTime.Now);
System\Windows\Data\CollectionView.cs (2)
1838long beginTime = DateTime.Now.Ticks; 1846mustDeferProcessing = DateTime.Now.Ticks - beginTime > DataBindEngine.CrossThreadThreshold;
System\Windows\Documents\Speller.cs (2)
540timeLimit = DateTime.Now.Ticks + MaxIdleTimeSliceNs; 1849long nowTicks = DateTime.Now.Ticks;
System\Windows\Documents\Tracing\SpellerCOMActionTraceLogger.cs (2)
168_beginTicks = DateTime.Now.Ticks; 239UpdateRunningAverageAndLogDebugInfo(endTicks: DateTime.Now.Ticks);
PresentationUI (3)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
911collection = collection.Find(X509FindType.FindByTimeValid, DateTime.Now, true /*validOnly*/);
MS\Internal\Documents\RequestedSignatureDialog.cs (2)
29_dateTimePicker.MinDate = DateTime.Now; 30_dateTimePicker.Value = DateTime.Now.AddDays(10);
QueueSharing (1)
Program.cs (1)
67await context.Response.WriteAsync("Hello world from " + context.Request.Host + " at " + DateTime.Now);
ReachFramework (2)
AlphaFlattener\Utility.cs (2)
31 s_startTime = DateTime.Now; 36 TimeSpan elapsed = DateTime.Now - s_startTime;
Redis.ApiService (3)
Program.cs (3)
22return await connection.GetDatabase().StringSetAsync("Key", $"{DateTime.Now}"); 38return await connection.GetDatabase().StringSetAsync("Key", $"{DateTime.Now}"); 54return await connection.GetDatabase().StringSetAsync("Key", $"{DateTime.Now}");
Roslyn.Test.Performance.Utilities (2)
Logger.cs (2)
64Console.WriteLine(DateTime.Now + " : " + v); 65_buffer.AppendLine(DateTime.Now + " : " + v);
Roslyn.VisualStudio.Next.UnitTests (2)
Services\SolutionServiceTests.cs (2)
514var frozenSolution1 = solution.WithFrozenSourceGeneratedDocument(documentIdentity, DateTime.Now, frozenText1).Project.Solution; 523var frozenSolution2 = solution.WithFrozenSourceGeneratedDocument(documentIdentity, DateTime.Now, frozenText2).Project.Solution;
RunTests (2)
Program.cs (2)
141var start = DateTime.Now; 152var elapsed = DateTime.Now - start;
Sample (6)
Endpoints\MapResponsesEndpoints.cs (4)
11responses.MapGet("/200-add-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now)) 14responses.MapGet("/200-only-xml", () => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now))
Endpoints\MapVersionedEndpoints.cs (2)
15v1.MapGet("/todos/{id}", (int id) => new TodoWithDueDate(1, "Test todo", false, DateTime.Now.AddDays(1), DateTime.Now))
ScenarioTests.Common.Tests (5)
ScenarioTestHelpers.cs (1)
236int seed = DateTime.Now.Millisecond;
ScenarioTestTypes.cs (4)
1122_readStartedTime = DateTime.Now; 1124if (DateTime.Now - _readStartedTime >= StreamDuration) 1138int seed = DateTime.Now.Millisecond; 1189Name = "ClientReceiver_" + DateTime.Now;
Security.TransportSecurity.IntegrationTests (1)
Tcp\ClientCredentialTypeTests.OSX.cs (1)
124DateTime now = DateTime.Now;
SecurityWebSite (1)
BearerAuth.cs (1)
36var token = new JwtSecurityToken(Issuer, Audience, claims, expires: DateTime.Now.AddMinutes(30), signingCredentials: Credentials);
SelfHostServer (1)
Startup.cs (1)
31await context.Response.WriteAsync("Hello world from " + context.Request.Host + " at " + DateTime.Now);
ServiceBusWorker (1)
Producer.cs (1)
19await sender.SendMessageAsync(new ServiceBusMessage($"Hello, World! It's {DateTime.Now} here."), cancellationToken);
SessionSample (1)
Startup.cs (1)
65await context.Response.WriteAsync(DateTime.Now + "<br>");
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
297var token = new JwtSecurityToken("SignalRTestServer", "SignalRTests", claims, expires: DateTime.Now.AddSeconds(5), signingCredentials: credentials);
Sockets.FunctionalTests (4)
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (4)
146lastBytesWritten = DateTime.Now; 175while ((DateTime.Now - lastBytesWritten) < bytesWrittenTimeout || 239lastBytesWritten = DateTime.Now; 265while ((DateTime.Now - lastBytesWritten) < bytesWrittenTimeout ||
Stress.ApiService (1)
Program.cs (1)
318DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
System.ComponentModel.TypeConverter (1)
System\Timers\Timer.cs (1)
305ElapsedEventArgs elapsedEventArgs = new ElapsedEventArgs(DateTime.Now);
System.Diagnostics.Process (1)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
258_exitTime = DateTime.Now;
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
235InternalWrite(eventCache != null ? eventCache.DateTime : DateTime.Now);
System.DirectoryServices.Protocols (2)
System\DirectoryServices\Protocols\ldap\LdapAsyncResult.cs (1)
93_startTime = DateTime.Now;
System\DirectoryServices\Protocols\ldap\LdapPartialResultsProcessor.cs (1)
147if ((asyncResult._startTime.Ticks + asyncResult._requestTimeout.Ticks) > DateTime.Now.Ticks)
System.Drawing.Common.Tests (1)
System\Drawing\ImageAnimator.ManualTests.cs (1)
10public static string OutputFolder { get; } = Path.Join(Environment.CurrentDirectory, "ImageAnimatorManualTests", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"));
System.Linq.Parallel (8)
System\Linq\Parallel\Merging\AsynchronousChannelMergeEnumerator.cs (1)
268TraceHelpers.TraceInfo("[timing]: {0}: Completed the merge", DateTime.Now.Ticks);
System\Linq\Parallel\Merging\SynchronousChannelMergeEnumerator.cs (1)
106TraceHelpers.TraceInfo("[timing]: {0}: Completed the merge", DateTime.Now.Ticks);
System\Linq\Parallel\QueryOperators\PartitionedStreamMerger.cs (1)
63TraceHelpers.TraceInfo("[timing]: {0}: finished opening - QueryOperator<>::GetEnumerator", DateTime.Now.Ticks);
System\Linq\Parallel\QueryOperators\QueryOperator.cs (1)
175TraceHelpers.TraceInfo("[timing]: {0}: starting execution - QueryOperator<>::GetQueryResults", DateTime.Now.Ticks);
System\Linq\Parallel\Scheduling\QueryTask.cs (4)
63TraceHelpers.TraceInfo("[timing]: {0}: Running work synchronously", DateTime.Now.Ticks, _taskIndex); 83TraceHelpers.TraceInfo("[timing]: {0}: Queue work {1} to occur asynchronously", DateTime.Now.Ticks, _taskIndex); 95TraceHelpers.TraceInfo("[timing]: {0}: Start work {1}", DateTime.Now.Ticks, _taskIndex); 108TraceHelpers.TraceInfo("[timing]: {0}: End work {1}", DateTime.Now.Ticks, _taskIndex);
System.Net.Mail (1)
System\Net\Mail\MailPriority.cs (1)
379MailBnfHelper.GetDateTimeString(DateTime.Now, null)!);
System.Net.Primitives (1)
System\Net\CookieCollection.cs (1)
160m_TimeStamp = DateTime.Now;
System.Net.Requests (4)
System\Net\FtpWebRequest.cs (1)
1669_ftpWebResponse = new FtpWebResponse(responseStream, -1, _uri, FtpStatusCode.Undefined, null, DateTime.Now, null, null, null);
System\Net\HttpWebResponse.cs (1)
149return DateTime.Now;
System\Net\ServicePoint\ServicePointManager.cs (2)
127sp.IdleSince = DateTime.Now; 154IdleSince = DateTime.Now,
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
501string boundary = $"---------------------{DateTime.Now.Ticks:x}";
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1546public static DateTime Today => Now.Date;
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
799offset = TimeZoneInfo.GetLocalUtcOffset(DateTime.Now, TimeZoneInfoOptions.NoThrowOnInvalidTime);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (2)
2918resultTicks += tz.GetUtcOffset(bTimeOnly ? DateTime.Now : result.parsedDate, TimeZoneInfoOptions.NoThrowOnInvalidTime).Ticks; 3845return (styles & DateTimeStyles.AssumeUniversal) != 0 ? DateTime.UtcNow : DateTime.Now;
System.Private.Windows.Core.Tests (6)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (5)
47DateTime.Now, 142new Hashtable { { "DateTime", DateTime.Now } }, 983public DateTime? Today = DateTime.Now; 1000public DateTime[] DateTimeArray = [DateTime.Now]; 1024public List<DateTime> DateTimes = [DateTime.Now];
System\Value\StoringDateTime.cs (1)
10{ DateTime.Now },
System.Private.Xml (5)
System\Xml\Schema\XsdDateTime.cs (4)
390result = new DateTime(DateTime.Now.Year, xdt.Month, xdt.Day); 394DateTime currentDateTime = DateTime.Now; 450dt = new DateTime(DateTime.Now.Year, xdt.Month, xdt.Day); 454DateTime currentDateTime = DateTime.Now;
System\Xml\Xsl\IlGen\XmlILTrace.cs (1)
114w.WriteAttributeString("timestamp", DateTime.Now.ToString(CultureInfo.InvariantCulture));
System.Runtime.Caching (8)
System\Runtime\Caching\CacheExpires.cs (4)
571",now=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture) + 679" expired items, bucket=" + _bucket + "; Time=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture)); 743" expired items, bucket=" + _bucket + "; Time=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture)); 816Dbg.Trace("CacheExpiresFlushTotal", "FlushExpiredItems flushed a total of " + flushed + " items; Time=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture));
System\Runtime\Caching\CacheUsage.cs (2)
748" underused items; Time=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture)); 807" underused items; Time=" + DateTime.Now.ToString("o", CultureInfo.InvariantCulture));
System\Runtime\Caching\MemoryCacheStatistics.cs (1)
279Dbg.Trace("MemoryCacheStats", "**BEG** CacheManagerThread " + DateTime.Now.ToString("T", CultureInfo.InvariantCulture));
System\Runtime\Caching\MemoryMonitor.cs (1)
88+ " " + DateTime.Now.ToString("o", CultureInfo.InvariantCulture));
System.Security.Cryptography (3)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9SigningTime.cs (1)
25: this(DateTime.Now)
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
136chainPolicy.VerificationTimeIgnored ? DateTime.Now : chainPolicy.VerificationTime,
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (1)
132_verificationTime = DateTime.Now;
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9SigningTime.cs (1)
25: this(DateTime.Now)
System.ServiceModel.Primitives (3)
Internals\System\Xml\XmlMtomWriter.cs (1)
493return string.Format(CultureInfo.InvariantCulture, "http://tempuri.org/{0}/{1}", index, DateTime.Now.Ticks);
System\IdentityModel\Selectors\X509CertificateValidator.cs (2)
153DateTime now = DateTime.Now; 212_chainPolicy.VerificationTime = DateTime.Now;
System.ServiceModel.Primitives.Tests (2)
ServiceModel\MessageContractTest.4.4.0.cs (2)
201request.transactionDate = DateTime.Now; 283request.transactionDate = DateTime.Now;
System.Windows.Forms (26)
System\Windows\Forms\ComponentModel\COM2Interop\COM2Properties.cs (3)
53_touchedTime = DateTime.Now.Ticks; 119public long TicksSinceTouched => _touchedTime == 0 ? 0 : DateTime.Now.Ticks - _touchedTime; 131_touchedTime = DateTime.Now.Ticks;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
2038_autoCompleteTimeStamp = DateTime.Now.Ticks; 2053if (DateTime.Now.Ticks - _autoCompleteTimeStamp > AutoCompleteTimeout || 2070_autoCompleteTimeStamp = DateTime.Now.Ticks; 2085if (DateTime.Now.Ticks - _autoCompleteTimeStamp > AutoCompleteTimeout) 2094_autoCompleteTimeStamp = DateTime.Now.Ticks; 2111_autoCompleteTimeStamp = DateTime.Now.Ticks;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
5776&& (DateTime.Now.Ticks - _lastMouseClickInfo.TimeStamp) / 10000 <= SystemInformation.DoubleClickTime 25398_lastMouseClickInfo.TimeStamp = DateTime.Now.Ticks;
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (4)
85private DateTime _value = DateTime.Now; 86private DateTime _creationTime = DateTime.Now; 967_creationTime = DateTime.Now; 1248_value = DateTime.Now;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
104private DateTime _todaysDate = DateTime.Now.Date; 548private static DateTime Now => DateTime.Now.Date; 1191textExtent = screen.HDC.GetTextExtent(DateTime.Now.ToShortDateString(), hfont);
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (2)
57return new SelectionRange(DateTime.Now.Date, DateTime.Now.Date);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
2622long timeStamp = DateTime.Now.Ticks; 3484_rowSelectTime = DateTime.Now.Ticks;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2585long newTime = DateTime.Now.Ticks;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
472long newTime = DateTime.Now.Ticks;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (2)
565long nowTicks = DateTime.Now.Ticks; 636_buttonPressedStartTime = DateTime.Now.Ticks;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\FormatControl.cs (1)
21private static readonly DateTime s_dateTimeFormatValue = DateTime.Now;
System.Windows.Forms.Primitives.TestUtilities (1)
Metafiles\EmfValidateHelper.cs (1)
24string timestamp = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
System.Windows.Forms.Tests (95)
System\Windows\Forms\BindingSourceTests.cs (2)
723new Journal { IDate = DateTime.Now, Name = "A" }, 724new Journal { IDate = DateTime.Now.AddDays(-2), Name = "B" }
System\Windows\Forms\ClipboardTests.cs (1)
636TestData expected = new(DateTime.Now);
System\Windows\Forms\ComboBoxTests.cs (1)
2428Random random = new(DateTime.Now.Millisecond);
System\Windows\Forms\DateTimePickerTests.cs (4)
479_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 482_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 657_dateTimePicker.Value = DateTime.Now; 661_dateTimePicker.Value = DateTime.Now.AddDays(1);
System\Windows\Forms\MonthCalendar.SelectionRangeConverterTests.cs (2)
156SelectionRange range = new SelectionRange(DateTime.Now, DateTime.Now.AddDays(1));
System\Windows\Forms\MonthCalendarTests.cs (84)
116Assert.Equal(DateTime.Now.Date, control.SelectionEnd); 117Assert.Equal(DateTime.Now.Date, control.SelectionRange.Start); 118Assert.Equal(DateTime.Now.Date, control.SelectionRange.End); 120Assert.Equal(DateTime.Now.Date, control.SelectionStart); 135Assert.Equal(DateTime.Now.Date, control.TodayDate); 1315yield return new object[] { new DateTime(9998, 12, 31), new DateTime(9998, 12, 31), DateTime.Now.Date }; 1316yield return new object[] { new DateTime(9999, 1, 1), new DateTime(9998, 12, 31), DateTime.Now.Date }; 1317yield return new object[] { DateTime.MaxValue, new DateTime(9998, 12, 31), DateTime.Now.Date }; 1447yield return new object[] { DateTime.MinValue, new DateTime(1753, 1, 1), DateTime.Now.Date }; 1448yield return new object[] { new DateTime(1753, 1, 1), new DateTime(1753, 1, 1), DateTime.Now.Date }; 1449yield return new object[] { new DateTime(2019, 1, 29), new DateTime(2019, 1, 29), DateTime.Now.Date }; 1949yield return new object[] { DateTime.Now.Date.AddDays(-1), DateTime.Now.Date }; 1950yield return new object[] { DateTime.Now.Date, DateTime.Now.Date }; 2032yield return new object[] { DateTime.Now.Date.AddDays(1), DateTime.Now.Date }; 2033yield return new object[] { DateTime.Now.Date, DateTime.Now.Date }; 2121yield return new object[] { new SelectionRange(DateTime.Now.Date, DateTime.Now.Date), DateTime.Now.Date, DateTime.Now.Date }; 2122yield return new object[] { new SelectionRange(DateTime.Now.Date, DateTime.Now.Date.AddDays(1)), DateTime.Now.Date, DateTime.Now.Date.AddDays(1) }; 2123yield return new object[] { new SelectionRange(DateTime.Now.Date.AddHours(1), DateTime.Now.Date.AddHours(1)), DateTime.Now.Date, DateTime.Now.Date }; 2124yield return new object[] { new SelectionRange(DateTime.Now.Date.AddDays(1), DateTime.Now.Date), DateTime.Now.Date, DateTime.Now.Date.AddDays(1) }; 2125yield return new object[] { new SelectionRange(DateTime.Now.Date, DateTime.Now.Date.AddDays(6)), DateTime.Now.Date, DateTime.Now.Date.AddDays(6) }; 2126yield return new object[] { new SelectionRange(DateTime.Now.Date, DateTime.Now.Date.AddDays(7)), DateTime.Now.Date.AddDays(1), DateTime.Now.Date.AddDays(7) }; 2837Assert.Equal(DateTime.Now.Date, control.TodayDate); 2848yield return new object[] { DateTime.Now.Date }; 2849yield return new object[] { DateTime.Now.Date.AddHours(1) }; 3459yield return new object[] { new DateRangeEventArgs(DateTime.Now, DateTime.Now) }; 3957yield return new object[] { DateTime.Now.Date }; 3958yield return new object[] { DateTime.Now.Date.AddHours(1) }; 4058yield return new object[] { DateTime.Now.Date, DateTime.Now.Date, DateTime.Now.Date, DateTime.Now.Date }; 4059yield return new object[] { DateTime.Now.Date, DateTime.Now.Date.AddDays(1), DateTime.Now.Date, DateTime.Now.Date.AddDays(1) }; 4060yield return new object[] { DateTime.Now.Date.AddHours(1), DateTime.Now.Date.AddHours(1), DateTime.Now.Date.AddHours(1), DateTime.Now.Date.AddHours(1) }; 4061yield return new object[] { DateTime.Now.Date.AddDays(1), DateTime.Now.Date, DateTime.Now.Date.AddDays(1), DateTime.Now.Date.AddDays(1) }; 4062yield return new object[] { DateTime.Now.Date, DateTime.Now.Date.AddDays(6), DateTime.Now.Date, DateTime.Now.Date.AddDays(6) }; 4063yield return new object[] { DateTime.Now.Date, DateTime.Now.Date.AddDays(7), DateTime.Now.Date.AddDays(1), DateTime.Now.Date.AddDays(7) }; 4516ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeTodayDate(), () => calendar.TodayDate = DateTime.Now); 4517ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeAnnuallyBoldedDates(), () => calendar.AddAnnuallyBoldedDate(DateTime.Now)); 4518ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeBoldedDates(), () => calendar.AddBoldedDate(DateTime.Now)); 4519ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeMonthlyBoldedDates(), () => calendar.AddMonthlyBoldedDate(DateTime.Now)); 4520ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeMaxDate(), () => calendar.MaxDate = DateTime.Now.AddYears(2)); 4521ShouldSerializeProperty(() => calendar.TestAccessor().Dynamic.ShouldSerializeMinDate(), () => calendar.MinDate = DateTime.Now); 4638DateTime originalDate = DateTime.Now.Date; 4657DateTime.Now, 4689calendar.AddAnnuallyBoldedDate(DateTime.Now); 4700calendar.AddBoldedDate(DateTime.Now);
System\Windows\Forms\PropertyStoreTests.cs (1)
183store.AddValue(1, DateTime.Now);
TestingAppHost1.MyWebApp (1)
Program.cs (1)
28DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Wasm.Performance.ConsoleHost (2)
Scenarios\ComponentRenderingScenarioBase.cs (2)
33var startTime = DateTime.Now; 36var duration = DateTime.Now - startTime;
WebPubSubWeb (1)
Program.cs (1)
87await service.SendToAllAsync($"{DateTime.Now}: Hello from background service.");
XmlFileLogger (1)
XmlFileLogger.cs (1)
85_build.AddMessage(new Message(string.Format("XmlFileLogger Error: {0}", e), DateTime.Now));
xunit.console (1)
ConsoleRunner.cs (1)
306assembliesElement.Add(new XAttribute("timestamp", DateTime.Now.ToString(CultureInfo.InvariantCulture)));
Yarp.Backend (1)
Program.cs (1)
24DateOnly.FromDateTime(DateTime.Now.AddDays(index)),