Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Update parameter names to match https://github.com/dotnet/coreclr/pull/23029#35813

Closed
filipnavara wants to merge 1 commit intodotnet:masterfrom
filipnavara:overlapped1
Closed

Conversation

@filipnavara
Copy link
Member

No description provided.

@ViktorHofer
Copy link
Member

Consider disabling the tests on netfx instead of special casing.

@filipnavara
Copy link
Member Author

Consider disabling the tests on netfx instead of special casing.

I thought of that and I think it's still useful to know that the exception is thrown on NetFX even if the parameter name is missing.

AssertExtensions.Throws<ArgumentException>(null, () => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
AssertExtensions.Throws<ArgumentException>(
PlatformDetection.IsFullFramework ? null : "userData",
() => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" }));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertExtensions.Throws<ArgumentException>(
    "userData",
    null,
    () => ...);

Is close to this same behavior, but for that method null to netfx means "don't check" instead of "check it's actually null".

If checking that it's actually null is useful, it's probably worth a comment saying that using the overload is wrong; otherwise consider using the overload.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartonjs Thanks, I figued out that the method exists based on the feedback on another PR. Would have been the perfect solution here.

@filipnavara
Copy link
Member Author

filipnavara commented Mar 11, 2019

Closing this for now because I abandoned dotnet/coreclr#23029 for performance reasons.

@karelz karelz added this to the 3.0 milestone Mar 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants