Skip to content

Use nameof() in bound parameters.contains key() - #7908

Merged
Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
iSazonov:Use-nameof()-in-BoundParameters.ContainsKey()
Oct 2, 2018
Merged

Ilya (iSazonov) merged 3 commits into
PowerShell:masterfrom
iSazonov:Use-nameof()-in-BoundParameters.ContainsKey()

Conversation

@iSazonov

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

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

@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
@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
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
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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants