Skip to content

Commit 1c5e515

Browse files
committed
Update
1 parent 8c8431d commit 1c5e515

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-FunctionCommand.ps1

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ param(
2323
[Parameter(Mandatory = $true)]
2424
[string]$ModelClassNameSpace,
2525

26-
[Parameter(Mandatory = $false)]
27-
[string]$CmdletNounPrefix = "Azure",
28-
2926
[Parameter(Mandatory = $false)]
3027
[string]$FileOutputFolder = $null
3128
)
@@ -38,22 +35,20 @@ param(
3835
function Generate-PsFunctionCommandImpl
3936
{
4037
param(
41-
[Parameter(Mandatory = $True)]
42-
[string]$fileOutputFolder,
43-
44-
[Parameter(Mandatory = $True)]
45-
$opShortName,
38+
[Parameter(Mandatory = $true)]
39+
[string]$opShortName,
4640

47-
[Parameter(Mandatory = $True)]
41+
[Parameter(Mandatory = $true)]
4842
[System.Reflection.MethodInfo]$operation_method_info,
4943

50-
[Parameter(Mandatory = $True)]
51-
[string]$invoke_cmdlet_class_name,
52-
53-
[Parameter(Mandatory = $True)]
54-
[string]$parameter_cmdlet_class_name
44+
[Parameter(Mandatory = $true)]
45+
[string]$fileOutputFolder
5546
)
5647

48+
$componentName = Get-ComponentName $ModelClassNameSpace;
49+
$invoke_cmdlet_class_name = 'InvokeAzure' + $componentName + 'MethodCmdlet';
50+
$parameter_cmdlet_class_name = 'NewAzure' + $componentName + 'ArgumentListCmdlet';
51+
5752
$methodName = ($operation_method_info.Name.Replace('Async', ''));
5853
$return_type_info = $operation_method_info.ReturnType;
5954
$normalized_output_type_name = Get-NormalizedTypeName $return_type_info;
@@ -950,14 +945,7 @@ function Generate-CliFunctionCommandImpl
950945
return $code;
951946
}
952947

953-
$componentName = Get-ComponentName $ModelClassNameSpace;
954-
$invoke_cmdlet_class_name = 'InvokeAzure' + $componentName + 'MethodCmdlet';
955-
$parameter_cmdlet_class_name = 'NewAzure' + $componentName + 'ArgumentListCmdlet';
956-
Generate-PsFunctionCommandImpl -fileOutputFolder $FileOutputFolder `
957-
-opShortName $OperationName `
958-
-operation_method_info $MethodInfo `
959-
-invoke_cmdlet_class_name $invoke_cmdlet_class_name `
960-
-parameter_cmdlet_class_name $parameter_cmdlet_class_name;
948+
Generate-PsFunctionCommandImpl $OperationName $MethodInfo $FileOutputFolder;
961949

962950
# CLI Function Command Code
963-
Write-Output (Generate-CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder);
951+
Generate-CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder;

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/RunCodeGeneration.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,6 @@ else
12211221
$outputs = (. $PSScriptRoot\Generate-FunctionCommand.ps1 -OperationName $opShortName `
12221222
-MethodInfo $methodInfo `
12231223
-ModelClassNameSpace $client_model_namespace `
1224-
-CmdletNounPrefix 'Azure' `
12251224
-FileOutputFolder $opOutFolder);
12261225

12271226
if ($outputs.Count -ne $null)

0 commit comments

Comments
 (0)