-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
Why? At least on Windows that should be doable. I expect there's an equivalent that could be done on other platforms, like using |
You should still be able to test it, e.g.
|
5bcc285
to
0555c43
Compare
|
If we're adding the properties now, I think we should add them correctly now. |
Then I'll need some help from someone. |
@OmarTawfik can you please help move the PR forward? |
@EdwinEngelen could you rebase? @stephentoub I think it is reasonable to check in just the getters alone as a step along for https://github.com/dotnet/corefx/issues/31181. It is not possible for us to forget the setters as they don't show in the ref, and there is presumably code that only use the getters. |
Does that mean we have tooling that shows up everything we're supposed to have but are missing, it's currently showing the getters and setters, and once this goes in it'll still show the setters? |
@danmosemsft can you please elaborate on |
var today = DateAndTime.Today.ToUniversalTime(); | ||
var dateTimeTodayAfter = DateTime.Today.ToUniversalTime(); | ||
|
||
Assert.InRange(today, dateTimeTodayBefore, dateTimeTodayAfter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
today [](start = 27, length = 5)
maybe also assert that time component is set to zeroes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need that assertion too. Thanks!
I rebased and tried to add the assertion, but somehow VS gives me strange compile errors. System.Object not defined, …
I'm on holiday and don't have time to figure it out right now.
Yes, if you count running genapis and windiff, or Apireviewer, when we believe we are done or ready to review where we are at. Something which we would do for any library port, but especially in this case where there was a very selective existing surface area.
The build validates our implementation (src) against our contract (ref) in both directions, but there is no automatic verification against .NET Framework surface area. That is what is done by diffing the output of genapis on the binaries. |
0555c43
to
dd55a30
Compare
dd55a30
to
c7c6881
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @EdwinEngelen
Commit migrated from dotnet/corefx@dfa1338
Newly added module DateAndTime with read-only properties Now and Today. Implementation is the same as in netfx.
Property Today is writable in netfx and uses kernel32.dll. That's not possible in corefx, thus property is read-only.
I tried to add tests, but experienced two problems: