Skip to content

Commit 45f0ea5

Browse files
committed
Update Verbose Output
1 parent ff367f4 commit 45f0ea5

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterTree.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ function Create-ParameterTreeImpl
6767
$treeNode = New-ParameterTreeNode $ParameterName $TypeInfo $Parent;
6868

6969
$padding = ($Depth.ToString() + (' ' * (4 * ($Depth + 1))));
70-
Write-Verbose ($padding + "-----------------------------------------------------------");
70+
if ($Depth -gt 0)
71+
{
72+
Write-Verbose ($padding + "-----------------------------------------------------------");
73+
}
74+
7175
Write-Verbose ($padding + "[ Node ] " + $treeNode.Name);
7276
Write-Verbose ($padding + "[Parent] " + $Parent.Name);
7377

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ param(
6363

6464
$NEW_LINE = "`r`n";
6565
$BAR_LINE = "=============================================";
66+
$SEC_LINE = "---------------------------------------------";
6667
$verbs_common_new = "VerbsCommon.New";
6768
$verbs_lifecycle_invoke = "VerbsLifecycle.Invoke";
6869
$client_model_namespace = $client_library_namespace + '.Models';
@@ -2078,7 +2079,8 @@ function Write-CLICommandFile
20782079
$fileFullPath = $fileOutputFolder + '/' + 'cli.js';
20792080

20802081
Write-Verbose "=============================================";
2081-
Write-Verbose ("Writing CLI Command File: " + $NEW_LINE + $fileFullPath);
2082+
Write-Verbose "Writing CLI Command File: ";
2083+
Write-Verbose $fileFullPath;
20822084
Write-Verbose "=============================================";
20832085

20842086
$codeContent =
@@ -2200,15 +2202,29 @@ else
22002202
$st = mkdir -Force $opOutFolder;
22012203

22022204
$methods = $ft.GetMethods();
2203-
foreach ($mt in $methods)
2205+
foreach ($mtItem in $methods)
22042206
{
2207+
[System.Reflection.MethodInfo]$mt = $mtItem;
22052208
if ($mt.Name.StartsWith('Begin') -and $mt.Name.Contains('ing'))
22062209
{
2207-
# Skip 'BeginXXX' Calls for Now...
2210+
# Skip 'Begin*ing*' Calls for Now...
22082211
continue;
22092212
}
2210-
2213+
2214+
# Output Info for Method Signature
2215+
Write-Verbose "";
2216+
Write-Verbose $SEC_LINE;
22112217
Write-Verbose $mt.Name.Replace('Async', '');
2218+
foreach ($paramInfoItem in $mt.GetParameters())
2219+
{
2220+
[System.Reflection.ParameterInfo]$paramInfo = $paramInfoItem;
2221+
if ($paramInfo.ParameterType.Name -ne 'CancellationToken')
2222+
{
2223+
Write-Verbose ("-" + $paramInfo.Name + " : " + $paramInfo.ParameterType);
2224+
}
2225+
}
2226+
Write-Verbose $SEC_LINE;
2227+
22122228
$outputs = Write-OperationCmdletFile $opOutFolder $opShortName $mt $invoke_cmdlet_class_name $parameter_cmdlet_class_name;
22132229
if ($outputs.Count -ne $null)
22142230
{

0 commit comments

Comments
 (0)