Skip to content

Issue #45096 Toru_Watanbe - #48352

Closed
toruwatanbe wants to merge 1 commit into
dotnet:mainfrom
toruwatanbe:main
Closed

toruwatanbe wants to merge 1 commit into
dotnet:mainfrom
toruwatanbe:main

Conversation

@toruwatanbe

@toruwatanbe toruwatanbe commented May 21, 2023 •

Copy link
Copy Markdown

{PR title}

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

{Detail}

Fixes #45096

@toruwatanbe
toruwatanbe requested a review from a team as a code owner May 21, 2023 13:27
@ghost ghost added area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member labels May 21, 2023
@ghost

ghost commented May 21, 2023

Copy link
Copy Markdown

Thanks for your PR, @toruwatanbe. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mkArtakMSFT

Copy link
Copy Markdown
Contributor

@surayya-MS can you please review this? Thanks!

moghitech

This comment was marked as resolved.

@surayya-MS

surayya-MS commented May 22, 2023 •

Copy link
Copy Markdown
Member

Thanks for your contribution, @toruwatanbe !

I've tried out your changes on this test scenario and found out that the error message is still the same "Value cannot be null. (Parameter 'obj')".
When debugging I also noticed that the FieldIdentifier constructor wasn't called. Hence, it appears that the issue lies elsewhere.

If you have any further updates or improvements to address this issue, please feel free to continue with the PR.

@surayya-MS surayya-MS added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label May 22, 2023
@ghost

ghost commented May 22, 2023

Copy link
Copy Markdown

Hello. I see that you've just added Needs: Author Feedback label to this PR.
That label is for Issues and not for PRs. Don't worry, I'm going to replace it with the correct one.

@ghost ghost added pr: pending author input For automation. Specifically separate from Needs: Author Feedback and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels May 22, 2023
public FieldIdentifier(object model, string fieldName)
{
ArgumentNullException.ThrowIfNull(model);
ArgumentNullException.ThrowIfNull(model, nameof(model));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this change makes any difference. Doesn't ArgumentNullException.ThrowIfNull use [CallerNameExpression] to receive the parameter expression string anyway? (Reference: https://endjin.com/blog/2021/11/csharp-10-net-6-argument-exceptions)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for your contribution, @toruwatanbe !

I've tried out your changes on this test scenario and found out that the error message is still the same "Value cannot be null. (Parameter 'obj')". When debugging I also noticed that the FieldIdentifier constructor wasn't called. Hence, it appears that the issue lies elsewhere.

If you have any further updates or improvements to address this issue, please feel free to continue with the PR.

Thank you for testing it and giving feedback. I am new here, can you tell me how do you test the code. In this case or in any case how does one test an entire framework or an entire wmdows or any other app. Thank you again.

@surayya-MS

Copy link
Copy Markdown
Member

@toruwatanbe, of course. First make sure you followed this doc Build from Source. Then you can change Samples/BlazorServerApp to repro this test scenario, put breakpoints in the file you changed (or anywhere) FieldIdentifier and start the BlazorServerApp with the debugger attached.

@toruwatanbe

Copy link
Copy Markdown
Author

@toruwatanbe, of course. First make sure you followed this doc Build from Source. Then you can change Samples/BlazorServerApp to repro this test scenario, put breakpoints in the file you changed (or anywhere) FieldIdentifier and start the BlazorServerApp with the debugger attached.

Thank you so much!!Means a lot. @surayya-MS

@moghitech moghitech left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe Without {} is More Than Readable :)
Just For Improve Readability

@ghost

ghost commented Jun 4, 2023

Copy link
Copy Markdown

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no breaking changes are introduced, please leave an /azp run comment here to rerun the CI pipeline and confirm success before merging the change.

@ghost ghost added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jun 4, 2023
@surayya-MS

Copy link
Copy Markdown
Member

Looks like this PR hasn't been active for a while now. Closing this PR. Feel free to open a new one to address this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun pr: pending author input For automation. Specifically separate from Needs: Author Feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor Value cannot be null. (Parameter 'obj')

5 participants