23
23
[Parameter (Mandatory = $true )]
24
24
[string ]$ModelClassNameSpace ,
25
25
26
- [Parameter (Mandatory = $false )]
27
- [string ]$CmdletNounPrefix = " Azure" ,
28
-
29
26
[Parameter (Mandatory = $false )]
30
27
[string ]$FileOutputFolder = $null
31
28
)
@@ -38,22 +35,20 @@ param(
38
35
function Generate-PsFunctionCommandImpl
39
36
{
40
37
param (
41
- [Parameter (Mandatory = $True )]
42
- [string ]$fileOutputFolder ,
43
-
44
- [Parameter (Mandatory = $True )]
45
- $opShortName ,
38
+ [Parameter (Mandatory = $true )]
39
+ [string ]$opShortName ,
46
40
47
- [Parameter (Mandatory = $True )]
41
+ [Parameter (Mandatory = $true )]
48
42
[System.Reflection.MethodInfo ]$operation_method_info ,
49
43
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
55
46
)
56
47
48
+ $componentName = Get-ComponentName $ModelClassNameSpace ;
49
+ $invoke_cmdlet_class_name = ' InvokeAzure' + $componentName + ' MethodCmdlet' ;
50
+ $parameter_cmdlet_class_name = ' NewAzure' + $componentName + ' ArgumentListCmdlet' ;
51
+
57
52
$methodName = ($operation_method_info.Name.Replace (' Async' , ' ' ));
58
53
$return_type_info = $operation_method_info.ReturnType ;
59
54
$normalized_output_type_name = Get-NormalizedTypeName $return_type_info ;
@@ -950,14 +945,7 @@ function Generate-CliFunctionCommandImpl
950
945
return $code ;
951
946
}
952
947
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 ;
961
949
962
950
# CLI Function Command Code
963
- Write-Output ( Generate- CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder ) ;
951
+ Generate- CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder ;
0 commit comments