Support Forums

[PSS 2015] Renaming variables: Parameter

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
User avatar
Bosparan
Posts: 213
Joined: Sun Mar 03, 2013 12:45 pm

[PSS 2015] Renaming variables: Parameter

Postby Bosparan » Tue Dec 08, 2015 9:44 am

Hi guys,

another small request, to make a features that already exists work more smoothly:

When renaming the parameter of a function, could you also rename ...
... $PSBoundParameters entries?
... Examples in the Help section?
... Parameter documentation in the Help section?

Example of current State
Before Rename
function Get-Test
{
<#
.SYNOPSIS
A brief description of the Get-Test function.
 
.DESCRIPTION
A detailed description of the Get-Test function.
 
.PARAMETER Foo
A description of the Foo parameter.
 
.EXAMPLE
PS C:\> Get-Test -Foo $value1
 
.NOTES
BlaBla
 
.LINK
Link to Website.
#>

[CmdletBinding()]
Param (
$Foo
)
 
if ($PSBoundParameters['Foo'])
{
 
}
}


After Rename
function Get-Test
{
<#
.SYNOPSIS
A brief description of the Get-Test function.
 
.DESCRIPTION
A detailed description of the Get-Test function.
 
.PARAMETER Foo
A description of the Foo parameter.
 
.EXAMPLE
PS C:\> Get-Test -Foo $value1
 
.NOTES
BlaBla
 
.LINK
Link to Website.
#>

[CmdletBinding()]
Param (
$Bar
)
 
if ($PSBoundParameters['Foo'])
{
 
}
}


Cheers,
Bosparan
User avatar
davidc
Posts: 4452
Joined: Thu Aug 18, 2011 4:56 am

Re: [PSS 2015] Renaming variables: Parameter

Postby davidc » Tue Dec 08, 2015 10:23 am

The $PSBoundParameters reference will be picked up if you use the ContainsKey method. We will make sure it also picks up the indexing operator as well in the next build.

Updating the comment-based help is on our list of wanted features.

David
David
SAPIEN Technologies, Inc.

Return to “Wish List and Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests