GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use nameof() in bound parameters.contains key() by iSazonov · Pull Request #7908 · PowerShell/PowerShell

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Oct 1, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

PR Summary

Related #6548.

Replace code like BoundParameters.ContainsKey("Delimiter") with BoundParameters.ContainsKey(nameof(Delimiter)). Old pattern come from old C# (<6.0) without nameof().

The PR doesn't address some cases like common and provider parameter names. (It is not clear how fix this).

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Ilya (iSazonov) added 2 commits October 1, 2018 14:10
@iSazonov
Step 1
afeca41
@iSazonov
Step 2
9911938
@iSazonov Ilya (iSazonov) self-assigned this Oct 1, 2018
@iSazonov
Ilya (iSazonov) requested review from Steve Lee (SteveL-MSFT), Travis Plunk (TravisEz13) and Dongbo Wang (daxian-dbw) October 1, 2018 09:27
@iSazonov
Ilya (iSazonov) requested review from James Truher (JamesWTruher), Paul Higinbotham (PaulHigin) and Mike Richmond (mirichmo) as code owners October 1, 2018 09:27
@iSazonov
[Feature] Step 3
fce2d87
@iSazonov
Ilya (iSazonov) force-pushed the Use-nameof()-in-BoundParameters.ContainsKey() branch from ad34473 to fce2d87 Compare October 1, 2018 10:38
@iSazonov Ilya (iSazonov) added the Issue-Code Cleanup the issue is for cleaning up the code with no impact on functionality label Oct 1, 2018
lzybkr
Jason Shirk (lzybkr) approved these changes Oct 1, 2018
View reviewed changes
TravisEz13
Travis Plunk (TravisEz13) approved these changes Oct 1, 2018
View reviewed changes
@iSazonov
Ilya (iSazonov) merged commit d946121 into PowerShell:master Oct 2, 2018
@iSazonov
Ilya (iSazonov) deleted the Use-nameof()-in-BoundParameters.ContainsKey() branch October 2, 2018 03:23
Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
@iSazonov
Use nameof() in bound parameters.contains key() (PowerShell#7908)
e77b192
Replace code like BoundParameters.ContainsKey("Delimiter") with BoundParameters.ContainsKey(nameof(Delimiter)). Old pattern come from old C# (<6.0) without nameof().
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@iSazonov
Use nameof() in bound parameters.contains key() (PowerShell#7908)
b0a67c7
Replace code like BoundParameters.ContainsKey("Delimiter") with BoundParameters.ContainsKey(nameof(Delimiter)). Old pattern come from old C# (<6.0) without nameof().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TravisEz13 Travis Plunk (TravisEz13) TravisEz13 approved these changes
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw daxian-dbw is a code owner
@SteveL-MSFT Steve Lee (SteveL-MSFT) Awaiting requested review from SteveL-MSFT
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher
@mirichmo Mike Richmond (mirichmo) Awaiting requested review from mirichmo
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin
+1 more reviewer
@lzybkr Jason Shirk (lzybkr) lzybkr approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iSazonov Ilya (iSazonov)

Labels

Issue-Code Cleanup the issue is for cleaning up the code with no impact on functionality

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@iSazonov @lzybkr @TravisEz13
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.