Azure / Azure/autorest.powershell
Incorporate 'using namespace' statements into exports
- Dominant language
- C#
- Stars
- 123
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
`using namespace` in PowerShell: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_using?view=powershell-6
Something like this:
```powershell
function Get-AzApplicationGateway {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Network.Models.Api20190201.IApplicationGateway])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Network.Profile('latest-2019-04-30')]
[Microsoft.Azure.PowerShell.Cmdlets.Network.Description('Gets the specified application gateway.')]
param(
[Parameter(ParameterSetName='Get', Mandatory, HelpMessage='The name of the application gateway.')]
[Alias('ApplicationGatewayName')]
[Microsoft.Azure.PowerShell.Cmdlets.Network.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Network.Runtime.Info(SerializedName='applicationGatewayName', Required, PossibleTypes=([System.String]), Description='The name of the application gateway.')]
[System.String]
# The name of the application gateway.
${Name},
...
```
becomes: (usings must be declared at the top of the file)
```powershell
using namespace System
using namespace Microsoft.Azure.PowerShell.Cmdlets.Network
using namespace Microsoft.Azure.PowerShell.Cmdlets.Network.Models.Api20190201
using namespace Microsoft.Azure.PowerShell.Cmdlets.Network.Runtime
...
function Get-AzApplicationGateway {
[OutputType([IApplicationGateway])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Profile('latest-2019-04-30')]
[Description('Gets the specified application gateway.')]
param(
[Parameter(ParameterSetName='Get', Mandatory, HelpMessage='The name of the application gateway.')]
[Alias('ApplicationGatewayName')]
[Category('Path')]
[Info(SerializedName='applicationGatewayName', Required, PossibleTypes=([String]), Description='The name of the application gateway.')]
[String]
# The name of the application gateway.
${Name},
...
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.