diff --git a/powershell/cmdlets/class.ts b/powershell/cmdlets/class.ts index 34b9997c42..d111b61989 100644 --- a/powershell/cmdlets/class.ts +++ b/powershell/cmdlets/class.ts @@ -588,7 +588,7 @@ export class CmdletClass extends Class { const $this = this; const lengthFunc = $this.state.project.fixedArray ? 'Length' : 'Count'; const listToArrayFunc = $this.state.project.fixedArray ? '.ToArray()' : ''; - if ($this.state.project.autoSwitchView) { + if ($this.state.project.autoSwitchView && !$this.operation.asjob) { if (isEnumerable) { return function* () { yield If(`null != ${valueName}`, function* () { @@ -643,7 +643,7 @@ export class CmdletClass extends Class { } // switch view property - if (this.state.project.autoSwitchView) { + if (this.state.project.autoSwitchView && !this.operation.asjob) { this.AddSwitchViewProperty(dotnet.Object); } @@ -663,7 +663,7 @@ export class CmdletClass extends Class { this.add(new Method('EndProcessing', dotnet.Void, { access: Access.Protected, override: Modifier.Override, description: 'Performs clean-up after the command execution' })).add( function* () { // gs01: remember what you were doing here to make it so these can be parallelized... - if ($this.state.project.autoSwitchView) { + if ($this.state.project.autoSwitchView && !$this.operation.asjob) { yield $this.FlushResponse(); } if (!$this.state.project.azure) { diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_Download.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_Download.cs index 8b73395002..dde7dbe58b 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_Download.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_Download.cs @@ -40,15 +40,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_Download : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadExpanded.cs index 1128038346..0774cff0d1 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadExpanded.cs @@ -43,15 +43,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadExp /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentity.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentity.cs index 8adf063945..8bbce0c44d 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentity.cs @@ -40,15 +40,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -557,24 +543,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityExpanded.cs index 675a6c9408..2cd3fe4fa0 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReport.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReport.cs index b6fa5a3fcd..187ee009e6 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReport.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReport.cs @@ -40,15 +40,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -569,24 +555,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReportExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReportExpanded.cs index 8c2b06bceb..e61ec46ad1 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReportExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaIdentityReportExpanded.cs @@ -43,15 +43,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -258,11 +249,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonFilePath.cs index d65a67a42c..a34ea6d38a 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonString.cs index ca592675e6..b74d29b691 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadViaJsonString.cs @@ -41,15 +41,6 @@ public partial class InvokeAzAppComplianceAutomationDownloadSnapshot_DownloadVia /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IDownloadResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_Fix.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_Fix.cs index f8fd7be2b0..5a4e6276ef 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_Fix.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_Fix.cs @@ -40,15 +40,6 @@ public partial class InvokeAzAppComplianceAutomationFixReport_Fix : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -210,11 +201,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -530,24 +516,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportFixResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_FixViaIdentity.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_FixViaIdentity.cs index 3a845c957a..68b7e31cca 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_FixViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationFixReport_FixViaIdentity.cs @@ -40,15 +40,6 @@ public partial class InvokeAzAppComplianceAutomationFixReport_FixViaIdentity : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -203,11 +194,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -535,24 +521,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportFixResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_Onboard.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_Onboard.cs index 205ca0736c..d61ac0890d 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_Onboard.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_Onboard.cs @@ -38,15 +38,6 @@ public partial class InvokeAzAppComplianceAutomationOnboardProviderAction_Onboar /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -210,11 +201,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -532,29 +518,7 @@ protected override void StopProcessing() var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / subscriptionIds / - if (null != result.SubscriptionId) - { - if (0 == _responseSize && 1 == result.SubscriptionId.Count) - { - _firstResponse = result.SubscriptionId[0]; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - var values = new System.Collections.Generic.List(); - foreach( var value in result.SubscriptionId ) - { - values.Add(value.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(values, true); - _responseSize = 2; - } - } + WriteObject(result.SubscriptionId, true); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardExpanded.cs index cf59f24002..91b40b740a 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardExpanded.cs @@ -41,15 +41,6 @@ public partial class InvokeAzAppComplianceAutomationOnboardProviderAction_Onboar /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -539,29 +525,7 @@ protected override void StopProcessing() var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / subscriptionIds / - if (null != result.SubscriptionId) - { - if (0 == _responseSize && 1 == result.SubscriptionId.Count) - { - _firstResponse = result.SubscriptionId[0]; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - var values = new System.Collections.Generic.List(); - foreach( var value in result.SubscriptionId ) - { - values.Add(value.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(values, true); - _responseSize = 2; - } - } + WriteObject(result.SubscriptionId, true); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonFilePath.cs index 93e2f3c784..0ac8cc399f 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class InvokeAzAppComplianceAutomationOnboardProviderAction_Onboar /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -212,11 +203,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -535,29 +521,7 @@ protected override void StopProcessing() var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / subscriptionIds / - if (null != result.SubscriptionId) - { - if (0 == _responseSize && 1 == result.SubscriptionId.Count) - { - _firstResponse = result.SubscriptionId[0]; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - var values = new System.Collections.Generic.List(); - foreach( var value in result.SubscriptionId ) - { - values.Add(value.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(values, true); - _responseSize = 2; - } - } + WriteObject(result.SubscriptionId, true); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonString.cs index b41d173022..ee7ec5daa1 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/InvokeAzAppComplianceAutomationOnboardProviderAction_OnboardViaJsonString.cs @@ -39,15 +39,6 @@ public partial class InvokeAzAppComplianceAutomationOnboardProviderAction_Onboar /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -210,11 +201,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Invoke /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -533,29 +519,7 @@ protected override void StopProcessing() var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / subscriptionIds / - if (null != result.SubscriptionId) - { - if (0 == _responseSize && 1 == result.SubscriptionId.Count) - { - _firstResponse = result.SubscriptionId[0]; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - var values = new System.Collections.Generic.List(); - foreach( var value in result.SubscriptionId ) - { - values.Add(value.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(values, true); - _responseSize = 2; - } - } + WriteObject(result.SubscriptionId, true); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateExpanded.cs index 35265b14f3..58d7efe6fb 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzAppComplianceAutomationReport_CreateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A class represent an AppComplianceAutomation report resource. private Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ReportResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.NewAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaIdentityExpanded.cs index 1c364c670d..206b01eba4 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzAppComplianceAutomationReport_CreateViaIdentityExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A class represent an AppComplianceAutomation report resource. private Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ReportResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -304,11 +295,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.NewAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -636,24 +622,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonFilePath.cs index dafbb8f4a5..366d26ae1c 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class NewAzAppComplianceAutomationReport_CreateViaJsonFilePath : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -230,11 +221,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.NewAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -550,24 +536,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonString.cs index db41063c0b..30da898ba4 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/NewAzAppComplianceAutomationReport_CreateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class NewAzAppComplianceAutomationReport_CreateViaJsonString : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -226,11 +217,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.NewAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -546,24 +532,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_Delete.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_Delete.cs index 28803bfe66..1b6e0a09f6 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_Delete.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzAppComplianceAutomationReport_Delete : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -224,11 +215,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_DeleteViaIdentity.cs index e475788c45..3b15c38ccf 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/RemoveAzAppComplianceAutomationReport_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzAppComplianceAutomationReport_DeleteViaIdentity : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateExpanded.cs index 5c17fa6aa1..a437f57d99 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class SetAzAppComplianceAutomationReport_UpdateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A class represent an AppComplianceAutomation report resource. private Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ReportResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -311,11 +302,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SetAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs index 6c0e691157..7e57a687ef 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class SetAzAppComplianceAutomationReport_UpdateViaJsonFilePath : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SetAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -551,24 +537,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonString.cs index 8c522e4344..de62609a86 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SetAzAppComplianceAutomationReport_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class SetAzAppComplianceAutomationReport_UpdateViaJsonString : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -227,11 +218,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SetAzA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -547,24 +533,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_Trigger.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_Trigger.cs index 4f6c11a350..3fefe5cc2b 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_Trigger.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_Trigger.cs @@ -38,15 +38,6 @@ public partial class StartAzAppComplianceAutomationProviderActionEvaluation_Trig /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -210,11 +201,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.StartA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -531,24 +517,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ITriggerEvaluationResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerExpanded.cs index 8d057660db..038197053c 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzAppComplianceAutomationProviderActionEvaluation_Trig /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -211,11 +202,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.StartA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -532,24 +518,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ITriggerEvaluationResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonFilePath.cs index 1e6cfd4fb4..55b1cdb08e 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzAppComplianceAutomationProviderActionEvaluation_Trig /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -212,11 +203,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.StartA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -533,24 +519,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ITriggerEvaluationResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonString.cs index 81386961a9..4f5a455f24 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/StartAzAppComplianceAutomationProviderActionEvaluation_TriggerViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzAppComplianceAutomationProviderActionEvaluation_Trig /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -210,11 +201,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.StartA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -531,24 +517,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ITriggerEvaluationResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_Sync.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_Sync.cs index 5fddd0c568..eb0c3b7702 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_Sync.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_Sync.cs @@ -38,15 +38,6 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_Sync : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -223,11 +214,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -543,24 +529,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_Sync() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded.cs index 34c8413387..7bf9de6949 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded.cs @@ -41,15 +41,6 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_SyncExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentity.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentity.cs index 1738d49869..aa988741c6 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentity.cs @@ -38,15 +38,6 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -551,24 +537,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentity() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentityExpanded.cs index 0ee512d6dc..3d942fc5be 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_SyncViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFilePath.cs index 10a33ce852..708504b7ad 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -227,11 +218,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -548,24 +534,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonString.cs index 8d83db71fa..aa67ecaba0 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonString.cs @@ -39,15 +39,6 @@ public partial class SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonSt /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -225,11 +216,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.SyncAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -546,24 +532,7 @@ public SyncAzAppComplianceAutomationReportCertRecord_SyncViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ISyncCertRecordResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_Verify.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_Verify.cs index a17067f2fc..0f46fb60a9 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_Verify.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_Verify.cs @@ -38,15 +38,6 @@ public partial class TestAzAppComplianceAutomationReport_Verify : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -209,11 +200,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.TestAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -529,24 +515,7 @@ public TestAzAppComplianceAutomationReport_Verify() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportVerificationResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_VerifyViaIdentity.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_VerifyViaIdentity.cs index 877ca57d57..78e69eef85 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_VerifyViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/TestAzAppComplianceAutomationReport_VerifyViaIdentity.cs @@ -38,15 +38,6 @@ public partial class TestAzAppComplianceAutomationReport_VerifyViaIdentity : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -201,11 +192,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.TestAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -533,24 +519,7 @@ public TestAzAppComplianceAutomationReport_VerifyViaIdentity() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportVerificationResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateExpanded.cs index 10427274e5..68cf492949 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzAppComplianceAutomationReport_UpdateExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A class represent a AppComplianceAutomation report resource update properties. private Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResourcePatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ReportResourcePatch(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzAppComplianceAutomationReport_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpanded.cs index a23177f0f7..03b8430bd8 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A class represent a AppComplianceAutomation report resource update properties. private Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResourcePatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.ReportResourcePatch(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -302,11 +293,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ public UpdateAzAppComplianceAutomationReport_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs index 49d4a32edf..b38270b455 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -228,11 +219,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -548,24 +534,7 @@ public UpdateAzAppComplianceAutomationReport_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonString.cs index 5db782eb1f..024b7c027a 100644 --- a/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AppComplianceAutomation.Management/target/generated/cmdlets/UpdateAzAppComplianceAutomationReport_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzAppComplianceAutomationReport_UpdateViaJsonString : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.ParameterCategory.Runtime)] @@ -226,11 +217,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -546,24 +532,7 @@ public UpdateAzAppComplianceAutomationReport_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Models.IReportResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateExpanded.cs index d98174070b..d8c65ae2fc 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzAstroOrganization_CreateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Astronomer private Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -529,11 +520,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.NewAzAstroOrganization_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -875,24 +861,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaIdentityExpanded.cs index d32430dcd8..d39adea42d 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzAstroOrganization_CreateViaIdentityExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Astronomer private Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -486,11 +477,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.NewAzAstroOrganization_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -853,24 +839,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonFilePath.cs index 658f4ab86d..6ddad2a686 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzAstroOrganization_CreateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.NewAzAstroOrganization_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonString.cs index 43b4f87a82..e8123c686d 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/NewAzAstroOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzAstroOrganization_CreateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.NewAzAstroOrganization_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_Delete.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_Delete.cs index 43066ae724..1962e68e8a 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzAstroOrganization_Delete : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.RemoveAzAstroOrganizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_DeleteViaIdentity.cs index 94d6cef518..26a0fd5cb2 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/RemoveAzAstroOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzAstroOrganization_DeleteViaIdentity : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.RemoveAzAstroOrganizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateExpanded.cs index 94d6b99bdb..85b530b775 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzAstroOrganization_UpdateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Astronomer private Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -530,11 +521,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.SetAzAstroOrganization_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -876,24 +862,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonFilePath.cs index 2604258ab5..93537a4897 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzAstroOrganization_UpdateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.SetAzAstroOrganization_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonString.cs index 696af61516..7691aeb0f6 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/SetAzAstroOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzAstroOrganization_UpdateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.SetAzAstroOrganization_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateExpanded.cs index 6f35a8e029..1bf4b522ed 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzAstroOrganization_UpdateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Astronomer private Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -518,11 +509,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.UpdateAzAstroOrganizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -975,24 +961,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateViaIdentityExpanded.cs index 640ed50c04..1e0bc3f695 100644 --- a/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Astronomer.Astro.Management/target/generated/cmdlets/UpdateAzAstroOrganization_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzAstroOrganization_UpdateViaIdentityExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Astronomer private Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Astro.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Astro.ParameterCategory.Runtime)] @@ -475,11 +466,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Astro.Cmdlets.UpdateAzAstroOrganizatio /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Astro.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -955,24 +941,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Astro.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateExpanded.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateExpanded.cs index 29a70db96f..35d6d09b40 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzComputeFleet_CreateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Compute Fleet resource private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.Fleet(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The list of location profiles. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of location profiles.")] @@ -575,11 +566,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.NewAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -921,24 +907,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaIdentityExpanded.cs index 82a573f5dd..0416426efa 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzComputeFleet_CreateViaIdentityExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Compute Fleet resource private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.Fleet(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The list of location profiles. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of location profiles.")] @@ -532,11 +523,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.NewAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -899,24 +885,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonFilePath.cs index 6b2f4257ed..c4535cc62b 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzComputeFleet_CreateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.NewAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonString.cs index f172481d60..f2015a3dbe 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/NewAzComputeFleet_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzComputeFleet_CreateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.NewAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_Delete.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_Delete.cs index 6b5f40d28c..3e7a997ac9 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_Delete.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzComputeFleet_Delete : global::System.Management.Aut /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.RemoveAzComputeFl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_DeleteViaIdentity.cs index 7543825e52..1156d0bd39 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/RemoveAzComputeFleet_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzComputeFleet_DeleteViaIdentity : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.RemoveAzComputeFl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateExpanded.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateExpanded.cs index d64b6ee65e..8f825cccf8 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzComputeFleet_UpdateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Compute Fleet resource private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.Fleet(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The list of location profiles. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of location profiles.")] @@ -576,11 +567,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.SetAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -922,24 +908,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonFilePath.cs index 74d9b466e7..d1d54692ee 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzComputeFleet_UpdateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.SetAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonString.cs index 9e6cd0633d..0787ead71d 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/SetAzComputeFleet_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzComputeFleet_UpdateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.SetAzComputeFleet /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateExpanded.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateExpanded.cs index 9ec1b5cb7b..837795eaed 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzComputeFleet_UpdateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Compute Fleet resource private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.Fleet(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The list of location profiles. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of location profiles.")] @@ -564,11 +555,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.UpdateAzComputeFl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -1025,24 +1011,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateViaIdentityExpanded.cs index a2a3f65369..a08e6356e5 100644 --- a/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureFleet.Management/target/generated/cmdlets/UpdateAzComputeFleet_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzComputeFleet_UpdateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Compute Fleet resource private Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.Fleet(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The list of location profiles. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of location profiles.")] @@ -521,11 +512,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Cmdlets.UpdateAzComputeFl /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -1005,24 +991,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Models.IFleet var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_Restart.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_Restart.cs index fe8d827b3d..4f12f6db2a 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_Restart.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_Restart.cs @@ -38,15 +38,6 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_Restart : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartExpanded.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartExpanded.cs index 7c4dc7d111..d91f55d290 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartExpanded.cs @@ -38,21 +38,12 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_RestartExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// The active state empowers the server with the ability to forcefully terminate /// and halt any existing processes that may be running on the server /// private Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IForceState _forceParameterBody = new Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.ForceState(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentity.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentity.cs index 8aa7f952bf..378611985f 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentityExpanded.cs index d4b1c4d859..097d6965c7 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIdentityExpanded.cs @@ -38,21 +38,12 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// The active state empowers the server with the ability to forcefully terminate /// and halt any existing processes that may be running on the server /// private Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IForceState _forceParameterBody = new Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.ForceState(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonFilePath.cs index aa1f9025c2..7e0cdc373a 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonString.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonString.cs index ab3c5bc867..df4f3770cd 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class RestartAzAzureLargeInstanceAzureLargeInstance_RestartViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.RestartAzAz /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_Start.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_Start.cs index 1fa2b411e4..4802432e27 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_Start.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzAzureLargeInstanceAzureLargeInstance_Start : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.StartAzAzur /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_StartViaIdentity.cs index dc113100ea..b257ee98f0 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StartAzAzureLargeInstanceAzureLargeInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzAzureLargeInstanceAzureLargeInstance_StartViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -203,11 +194,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.StartAzAzur /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -543,24 +529,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_Shutdown.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_Shutdown.cs index 3889648899..d433e7f3b3 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_Shutdown.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_Shutdown.cs @@ -38,15 +38,6 @@ public partial class StopAzAzureLargeInstanceAzureLargeInstance_Shutdown : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.StopAzAzure /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_ShutdownViaIdentity.cs b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_ShutdownViaIdentity.cs index f186fe6f9c..cb017d044d 100644 --- a/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_ShutdownViaIdentity.cs +++ b/tests-upgrade/tests-emitter/AzureLargeInstance.Management/target/generated/cmdlets/StopAzAzureLargeInstanceAzureLargeInstance_ShutdownViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzAzureLargeInstanceAzureLargeInstance_ShutdownViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.ParameterCategory.Runtime)] @@ -203,11 +194,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Cmdlets.StopAzAzure /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -544,24 +530,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateExpanded.cs index c5434c3f7e..f60e009cbd 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzCodeSigningAccount_CreateExpanded : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Trusted signing account resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CodeSigningAccount(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningAc /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -602,24 +588,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaIdentityExpanded.cs index ba2ed7cecd..451e657487 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzCodeSigningAccount_CreateViaIdentityExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Trusted signing account resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CodeSigningAccount(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -240,11 +231,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningAc /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonFilePath.cs index acd688c13a..125fcf5921 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzCodeSigningAccount_CreateViaJsonFilePath : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningAc /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonString.cs index f90d8a0014..ef48a4386f 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningAccount_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzCodeSigningAccount_CreateViaJsonString : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -258,11 +249,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningAc /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateExpanded.cs index faab402983..b9afc9980c 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzCodeSigningCertificateProfile_CreateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -346,11 +337,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningCe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -666,24 +652,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityCodeSigningAccountExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityCodeSigningAccountExpanded.cs index 750158f2b4..bc1889dadb 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityCodeSigningAccountExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityCodeSigningAccountExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzCodeSigningCertificateProfile_CreateViaIdentityCodeSig /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -306,11 +297,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningCe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -648,24 +634,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityExpanded.cs index f9481c493c..989094bd19 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzCodeSigningCertificateProfile_CreateViaIdentityExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -291,11 +282,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningCe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -635,24 +621,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonFilePath.cs index 32e89aefc6..c64ba57290 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzCodeSigningCertificateProfile_CreateViaJsonFilePath : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningCe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonString.cs index 7ea3a75af1..5c2f4840f8 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/NewAzCodeSigningCertificateProfile_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzCodeSigningCertificateProfile_CreateViaJsonString : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -273,11 +264,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.NewAzCodeSigningCe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -593,24 +579,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_Delete.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_Delete.cs index f19c6985e5..5db7cb7068 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_Delete.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzCodeSigningAccount_Delete : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -258,11 +249,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.RemoveAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_DeleteViaIdentity.cs index f023c149f5..b08b8f51c5 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningAccount_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzCodeSigningAccount_DeleteViaIdentity : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.RemoveAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_Delete.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_Delete.cs index a120bf4ab8..d6480d5239 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_Delete.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzCodeSigningCertificateProfile_Delete : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -273,11 +264,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.RemoveAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentity.cs index 83b243e6f0..ce19a5720a 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzCodeSigningCertificateProfile_DeleteViaIdentity : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.RemoveAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentityCodeSigningAccount.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentityCodeSigningAccount.cs index c76f512184..f468513353 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentityCodeSigningAccount.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/RemoveAzCodeSigningCertificateProfile_DeleteViaIdentityCodeSigningAccount.cs @@ -38,15 +38,6 @@ public partial class RemoveAzCodeSigningCertificateProfile_DeleteViaIdentityCode /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.RemoveAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateExpanded.cs index dbb961e064..788cff43f4 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzCodeSigningAccount_UpdateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Parameters for creating or updating a trusted signing account. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccountPatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CodeSigningAccountPatch(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -271,11 +262,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ public UpdateAzCodeSigningAccount_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded.cs index 41ee531f30..3bd09c6be9 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Parameters for creating or updating a trusted signing account. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccountPatch _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CodeSigningAccountPatch(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -229,11 +220,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -569,24 +555,7 @@ public UpdateAzCodeSigningAccount_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonFilePath.cs index af2ccf1eaf..a1e42534db 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzCodeSigningAccount_UpdateViaJsonFilePath : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ public UpdateAzCodeSigningAccount_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonString.cs index 196f98dabf..26595412a1 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningAccount_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzCodeSigningAccount_UpdateViaJsonString : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -258,11 +249,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ public UpdateAzCodeSigningAccount_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICodeSigningAccount var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateExpanded.cs index 95af72d698..a3583d0221 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzCodeSigningCertificateProfile_UpdateExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _accountName; @@ -346,11 +337,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -700,24 +686,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityCodeSigningAccountExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityCodeSigningAccountExpanded.cs index 6abdfb4b72..cbed28d9be 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityCodeSigningAccountExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityCodeSigningAccountExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityCode /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -306,11 +297,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -684,24 +670,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityExpanded.cs index 9069c2a2c4..3cc322df10 100644 --- a/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/CodeSigning.Management/target/generated/cmdlets/UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzCodeSigningCertificateProfile_UpdateViaIdentityExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Certificate profile resource. private Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.CertificateProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.ParameterCategory.Runtime)] @@ -291,11 +282,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Cmdlets.UpdateAzCodeSignin /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -672,24 +658,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Models.ICertificateProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateExpanded.cs index cfda9caa35..7f6b963a41 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzDeviceRegistryAssetEndpointProfile_CreateExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset Endpoint Profile definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetEndpointProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// /// Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). /// @@ -394,11 +385,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -714,24 +700,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaIdentityExpanded.cs index e741484740..7812e9449c 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzDeviceRegistryAssetEndpointProfile_CreateViaIdentityEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset Endpoint Profile definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetEndpointProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// /// Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). /// @@ -353,11 +344,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -694,24 +680,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonFilePath.cs index 3f681d7f6a..15126eb813 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonFilePa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonString.cs index 6d1bc26be1..87f061891f 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzDeviceRegistryAssetEndpointProfile_CreateViaJsonString /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateExpanded.cs index 2f0ee198e8..fcf7adddcb 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzDeviceRegistryAsset_CreateExpanded : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Asset(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -547,11 +538,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -867,24 +853,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaIdentityExpanded.cs index de45bc63d7..674adecd71 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzDeviceRegistryAsset_CreateViaIdentityExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Asset(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -504,11 +495,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -844,24 +830,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonFilePath.cs index a806d59a4f..e0e2531fee 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzDeviceRegistryAsset_CreateViaJsonFilePath : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonString.cs index e3859d845c..bed24673c3 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/NewAzDeviceRegistryAsset_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzDeviceRegistryAsset_CreateViaJsonString : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.NewAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_Delete.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_Delete.cs index a09c6ef2de..378fa1968d 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_Delete.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDeviceRegistryAssetEndpointProfile_Delete : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.RemoveAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_DeleteViaIdentity.cs index fe64c6ab8f..96f6811d1a 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAssetEndpointProfile_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDeviceRegistryAssetEndpointProfile_DeleteViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.RemoveAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_Delete.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_Delete.cs index 4b8410dfcd..e27fecfeae 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_Delete.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDeviceRegistryAsset_Delete : global::System.Managem /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.RemoveAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_DeleteViaIdentity.cs index 454c7c78f0..9129647cc0 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/RemoveAzDeviceRegistryAsset_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDeviceRegistryAsset_DeleteViaIdentity : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.RemoveAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_Replace.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_Replace.cs index 2777271088..c8decc95bd 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_Replace.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_Replace.cs @@ -39,15 +39,6 @@ public partial class SetAzDeviceRegistryAssetEndpointProfile_Replace : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceExpanded.cs index 9885186d8f..0ee4595bed 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzDeviceRegistryAssetEndpointProfile_ReplaceExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset Endpoint Profile definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetEndpointProfile(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// /// Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). /// @@ -395,11 +386,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -715,24 +701,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonFilePath.cs index d659c0620b..9771620855 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonString.cs index 096637c178..fcc5590a6e 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzDeviceRegistryAssetEndpointProfile_ReplaceViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_Replace.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_Replace.cs index 67260afd57..e753edf24f 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_Replace.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_Replace.cs @@ -39,15 +39,6 @@ public partial class SetAzDeviceRegistryAsset_Replace : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceExpanded.cs index 95d78e04d9..c59b0dc7ad 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzDeviceRegistryAsset_ReplaceExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Asset definition. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Asset(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -548,11 +539,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -868,24 +854,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonFilePath.cs index 6b956c4b32..b4834ab7ce 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzDeviceRegistryAsset_ReplaceViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonString.cs index 7dcac2545b..dada95302b 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/SetAzDeviceRegistryAsset_ReplaceViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzDeviceRegistryAsset_ReplaceViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.SetAzDeviceRegi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded.cs index 299b5dca1d..7414354aba 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the AssetEndpointProfile. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfileUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetEndpointProfileUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// /// Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). /// @@ -349,11 +340,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -669,24 +655,7 @@ public UpdateAzDeviceRegistryAssetEndpointProfile_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentityExpanded.cs index 42647bfed1..27ac7dc93b 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the AssetEndpointProfile. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfileUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetEndpointProfileUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// /// Stringified JSON that contains connectivity type specific further configuration (e.g. OPC UA, Modbus, ONVIF). /// @@ -306,11 +297,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -647,24 +633,7 @@ public UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFilePath.cs index 679fb25b83..f913ae85ab 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFil /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ public UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonString.cs index a7b1e296e2..0be1c5d8d2 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonStr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ public UpdateAzDeviceRegistryAssetEndpointProfile_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetEndpointProfile var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateExpanded.cs index 0514d9ce02..07bb487c05 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzDeviceRegistryAsset_UpdateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Asset. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -474,11 +465,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -794,24 +780,7 @@ public UpdateAzDeviceRegistryAsset_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded.cs index b63a038416..b29c86efc6 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Asset. private Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAssetUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.AssetUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -431,11 +422,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -771,24 +757,7 @@ public UpdateAzDeviceRegistryAsset_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath.cs index 96d696f813..cfed5a3581 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ public UpdateAzDeviceRegistryAsset_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonString.cs index f64b44dade..df98961a1c 100644 --- a/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DeviceRegistry.Management/target/generated/cmdlets/UpdateAzDeviceRegistryAsset_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzDeviceRegistryAsset_UpdateViaJsonString : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Cmdlets.UpdateAzDeviceR /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ public UpdateAzDeviceRegistryAsset_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IAsset var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_Promote.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_Promote.cs index 8690d8f0c4..86ec485428 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_Promote.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_Promote.cs @@ -38,15 +38,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_Promote : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteExpanded.cs index 9922a33958..d4273b4ffb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteExpanded.cs @@ -41,15 +41,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentity.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentity.cs index 3ae8c36564..c76f45755c 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -223,11 +214,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs index 17a5a6b2f6..3854c20ade 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -226,11 +217,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs index e4c6fa21cd..2e5e4d1968 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -267,11 +258,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs index 7d2d9b3f8e..70584c8fde 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs @@ -39,15 +39,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs index d1f0fff111..1833ecda37 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,24 +593,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs index 47a05b0dfa..058a66ba02 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -229,11 +220,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -573,24 +559,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs index 14109d4dd6..ca52148148 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaIdentityMongoCluster /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -247,11 +238,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -589,24 +575,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs index 3f3a9c5fdc..b1e6706909 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs index 1499ac5349..7e9f6bb6ce 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs index 015716a314..f23ea60908 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzMongoCluster_CreateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -450,11 +441,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -770,24 +756,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs index 9c21f34f0d..e08f25aa61 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzMongoCluster_CreateViaIdentityExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -407,11 +398,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -747,24 +733,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs index 951c975160..08cf0de3cb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzMongoCluster_CreateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs index 1e48086b75..777bd33ff0 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzMongoCluster_CreateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs index 15c7c933e6..12e1f84fb3 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs index 01feb9d3f4..1c3b94dbdb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs index 5293911891..66268370b2 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoClus /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs index 00b6709ada..40f66c9e1b 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoCluster_Delete : global::System.Management.Aut /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs index 9777d5e3e4..90512f90bf 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoCluster_DeleteViaIdentity : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs index 6a0782fa09..fdc16e3e38 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class SetAzMongoClusterFirewallRule_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -608,24 +594,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs index bd9f48de16..309613eff1 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs index b8cfc4ac70..f83dc1c752 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class SetAzMongoClusterFirewallRule_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs index 9a26dbc24c..67cf30a3d5 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzMongoCluster_UpdateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -451,11 +442,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -771,24 +757,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs index 8963a7c51f..66c1449529 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzMongoCluster_UpdateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs index eba412765d..d53e25858a 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzMongoCluster_UpdateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs index 8d58db823d..8f00066b57 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -621,24 +607,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs index a848662c63..afbb14a314 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs index fa2712f92c..70c12e664b 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClus /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -247,11 +238,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -605,24 +591,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs index 092940539e..8912a151c6 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzMongoCluster_UpdateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the MongoCluster. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoClusterUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -383,11 +374,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -703,24 +689,7 @@ public UpdateAzMongoCluster_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs index 5e25079e72..6556e718e4 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzMongoCluster_UpdateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the MongoCluster. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoClusterUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -680,24 +666,7 @@ public UpdateAzMongoCluster_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs index aa0cdacb0d..84006050ee 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzMongoCluster_UpdateViaJsonFilePath : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ public UpdateAzMongoCluster_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs index ed78d0b4ef..600a8a39fb 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzMongoCluster_UpdateViaJsonString : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ public UpdateAzMongoCluster_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs index 6ee299fb5b..33c4e5d069 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -295,11 +286,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs index 92769f9737..2f3dd4c7df 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -254,11 +245,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -622,24 +608,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs index 3596efe69d..ff730e54ae 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs index 5f4e793cde..67061aba39 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaJsonString : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs index 2d32e82638..7efc369a93 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzHealthDataAiServicesDeidService_Delete : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.RemoveAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs index 6b679a8fec..ccb2daf953 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.RemoveAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs index 9086bcc14d..f55d72c45d 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzHealthDataAiServicesDeidService_UpdateExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -284,11 +275,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.UpdateAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -657,24 +643,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs index 6257abd9c2..561a84265c 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.UpdateAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -640,24 +626,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs index a9eda51f08..840b4f24ac 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaOrganization_CreateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -524,11 +515,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -844,24 +830,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs index 5569be26e1..58859cb924 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaOrganization_CreateViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -481,11 +472,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -821,24 +807,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs index b7e524b360..93dd458124 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzInformaticaOrganization_CreateViaJsonFilePath : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs index b7e1ca4e46..4f4c442126 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzInformaticaOrganization_CreateViaJsonString : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs index 18e0f649f1..7aa7045833 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -434,11 +425,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -754,24 +740,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs index 8f39a61f00..8f2424fb1d 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -378,11 +369,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -722,24 +708,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs index 00f3bb1815..b807588d3d 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganiza /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -394,11 +385,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -736,24 +722,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs index b6d8ffc086..0e68a9cdec 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs index 502aa302f3..c8c41cd483 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaJsonString : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs index 0fdbe106f5..62e22cefcb 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaOrganization_Delete : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs index 11e9bbb717..96d7666e46 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaOrganization_DeleteViaIdentity : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs index 7c1b3fd941..513c7283df 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs index aab3d8b42f..cc494935c8 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs index 4e301c73da..63f4456f51 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrgan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs index d6d72994a8..47f26094e2 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzInformaticaOrganization_UpdateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -525,11 +516,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -845,24 +831,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs index 201072c813..8b8d2ea0cb 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzInformaticaOrganization_UpdateViaJsonFilePath : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs index 93ae74b7cf..37e1b0e6c9 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzInformaticaOrganization_UpdateViaJsonString : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs index 52a55384c2..098afd400b 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -435,11 +426,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -755,24 +741,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs index ab19ec5638..8387d6239d 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs index ebcebe2fd8..8c7b2baed6 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateViaJsonString : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs index f5156dcf8a..e3ac5e20e3 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs index 98f9da55de..b22d951711 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs index aef524249e..b3ed69b244 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs index 6f7f3456c3..5f40614ad8 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -561,24 +547,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs index ef4b7d95bc..f03c10bc73 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -605,24 +591,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs index 6043112507..8bbd560302 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs index 40e2f931c9..1df8759fb0 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs index bebd0f446a..02c4a437ef 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs index bc53cc3c03..0b19b8c0c7 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -365,11 +356,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -685,24 +671,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs index c3f286f838..6ededf10df 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -342,11 +333,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -679,24 +665,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs index 5d975da37f..5974f2065d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs index 4766f34cb3..3050f5f934 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs index f4d5db9cee..a5e1538fb2 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzContainerOrchestratorRuntimeStorageClass_Delete : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -239,11 +230,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.R /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs index d4beaef84e..a689ece946 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.R /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs index 47c15ae074..ecd4854496 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs index fb8940be6b..d10702fcdf 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs index 10567b863f..d22c5e10e6 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs index 3c5d51c81e..95d96184a5 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -286,11 +277,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs index d34c53287a..2fa29fa694 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs index 608b8a11a3..1a25b895bb 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs index b1997d693f..927a9a82fc 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -366,11 +357,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -686,24 +672,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs index 646e60a85d..1ee9ae19e6 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs index c2198107cd..60bd3bd6f3 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs index cefceb43e0..eb81f42539 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs index 0cdcb26597..53f958093d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs index 22d66b6e15..54fc5794ef 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs index ac62b56482..a5b986957a 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs index 04f86231b5..56bb236d0d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The model for updating a storageClass private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResourceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -465,11 +456,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -786,24 +772,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs index ad5c20a3f4..9051903451 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The model for updating a storageClass private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResourceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -442,11 +433,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -779,24 +765,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpande // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs index 2af6e5c23a..20561342f5 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs index 8dc74d4c43..4eca4aca1b 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs index 403f87742e..8f49a7e5ea 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzLambdaTestOrganization_CreateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -486,11 +477,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -832,24 +818,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs index 2abc21f1f7..b727b618e3 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzLambdaTestOrganization_CreateViaIdentityExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -443,11 +434,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -810,24 +796,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs index bd252ac37d..5f7f376f2a 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzLambdaTestOrganization_CreateViaJsonFilePath : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs index 9ba9f613fa..d8d245f70e 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzLambdaTestOrganization_CreateViaJsonString : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs index 051bd8d50a..c9c75255b8 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzLambdaTestOrganization_Delete : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.RemoveAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs index a7d1d98e33..2b034780a8 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzLambdaTestOrganization_DeleteViaIdentity : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.RemoveAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs index 2e28b0a56d..f5aedc70fa 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzLambdaTestOrganization_UpdateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -833,24 +819,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs index 77532f47dd..c63c583c11 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzLambdaTestOrganization_UpdateViaJsonFilePath : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs index 5ed261e2ce..b4f77644fb 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzLambdaTestOrganization_UpdateViaJsonString : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs index 286a0e829b..d98e7b8251 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzLambdaTestOrganization_UpdateExpanded : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -475,11 +466,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.UpdateAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -916,24 +902,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs index 8b61793ec2..0ecd0a5898 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -434,11 +425,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.UpdateAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -898,24 +884,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs index 773b1a9925..074c18c20c 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzWeightsBiasesInstance_CreateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -498,11 +489,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -844,24 +830,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs index 281bde226b..a957d97fcb 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzWeightsBiasesInstance_CreateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -455,11 +446,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -822,24 +808,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs index 86bbf37141..4214858a73 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzWeightsBiasesInstance_CreateViaJsonFilePath : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs index ef00e5b373..d63fd190c2 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzWeightsBiasesInstance_CreateViaJsonString : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs index 6e9e4b97f0..ca36411c2a 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzWeightsBiasesInstance_Delete : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.RemoveAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs index b1afad1844..0902103dcc 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzWeightsBiasesInstance_DeleteViaIdentity : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.RemoveAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs index 0219a9eddb..f32442f202 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzWeightsBiasesInstance_UpdateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -499,11 +490,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -845,24 +831,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs index a265014022..db3fd7dbb2 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzWeightsBiasesInstance_UpdateViaJsonFilePath : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs index 900abbf436..7147defa64 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzWeightsBiasesInstance_UpdateViaJsonString : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs index 6e4decfd60..82d525d512 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzWeightsBiasesInstance_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.UpdateAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -932,24 +918,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs index 73854872ca..15a2a7e41a 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -444,11 +435,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.UpdateAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -912,24 +898,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs index d596b42639..5ee36744a3 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzDevOpsInfrastructurePool_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -375,11 +366,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -721,24 +707,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs index 9eb2289a5f..be9d50eada 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -332,11 +323,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -699,24 +685,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs index 08e563858e..eac879dfc9 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs index e1e6625dd8..7e98d8fc47 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs index 2d5001acde..52bf30f864 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDevOpsInfrastructurePool_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.RemoveAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs index ea70a10853..359ee10c74 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.RemoveAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs index 721adc05df..8dfa01a797 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -376,11 +367,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -722,24 +708,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs index 18b9b69363..4a2c415a8f 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs index d8576794b4..1faee0cd2b 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs index fc1ee07e27..f8b05a1302 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzDevOpsInfrastructurePool_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -364,11 +355,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.UpdateAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -765,24 +751,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs index 59937824bc..a1930c005e 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -323,11 +314,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.UpdateAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -747,24 +733,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs index 60e2d7e85e..6b42a99bb1 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNeonPostgresOrganization_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -549,11 +540,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -869,24 +855,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs index 34375bfd78..a0b14ad17c 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNeonPostgresOrganization_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -506,11 +497,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -846,24 +832,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs index dc575747e2..8610aaec85 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNeonPostgresOrganization_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs index e0921114a2..4f4197f13e 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNeonPostgresOrganization_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs index 6e3e714e46..823c296035 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNeonPostgresOrganization_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.RemoveAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs index 51c53ed323..38f8e44aee 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNeonPostgresOrganization_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.RemoveAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs index c8d161578f..20e97802df 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzNeonPostgresOrganization_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -550,11 +541,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -870,24 +856,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs index 42f4d8c2c4..644336bdd8 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzNeonPostgresOrganization_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs index 181e098955..cd00ea2095 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzNeonPostgresOrganization_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs index 3eb93429c1..417e5bca4d 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -449,11 +440,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -769,24 +755,7 @@ public UpdateAzNeonPostgresOrganization_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs index 46befd89a9..94ba3d0820 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -408,11 +399,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -748,24 +734,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs index 83b5e8dbb4..2fdbb8098e 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs index 4b6e13a1ba..62f22e9d46 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs index a6d550775e..d93f9f868b 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -503,11 +494,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -849,24 +835,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs index 4bb1e869d0..eba2b22e47 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -462,11 +453,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -829,24 +815,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs index 57f2c2e988..bb7af9e482 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs index b1c88bf36e..c43f263805 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs index ed3abd5c22..d99069c2cb 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs index 782152d449..07320b39f7 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs index 6575de09fe..90501169b9 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs index 8317480c70..959c19bff6 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs index 1576ac79b7..2172f6a841 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs index 00b06c8b91..aa06982fc0 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataProduct_Delete : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs index 2929879e73..8d31f9f995 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs index 416a0f1668..5aba4be70b 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs index f82dc380ec..35b115d772 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs index 4236a96519..db3a34782b 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs index 9c4b4150fe..408ecbafe5 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs index 5ac9a7943b..1e3267ad81 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs index f3c972e75c..31e3c50c84 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs index b227a98295..b94673e839 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs index bb44df51ce..67eed5dce1 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs @@ -39,15 +39,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -290,11 +281,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs index ab462b6674..c898b4f39c 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs index 3c0e64dfd7..eb6005bd1d 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs index 8b1297c6f6..136a844dbd 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProdu /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs index 8171427417..1db6446bcb 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -329,11 +320,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -718,24 +704,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs index d63c7fbe54..b509465a19 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -701,24 +687,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs index 2abe8ad8ad..3e852fb0f3 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs index ba249dac49..2ab0bd1054 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProdu /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs index 4e2537e270..8b90f53ad5 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs index 1f20b054a0..97f5979d08 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs index 86ded1b672..022d795a1a 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs index 34118e1750..7bac165add 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzPineconeOrganization_CreateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -486,11 +477,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -832,24 +818,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs index 4d877bc369..9ae3ef19a5 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzPineconeOrganization_CreateViaIdentityExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -443,11 +434,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -810,24 +796,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs index 6c7984ef96..5ecc614d6b 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzPineconeOrganization_CreateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs index 546de1cdbe..280e5436b8 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzPineconeOrganization_CreateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs index a1596eb5f6..ba5580b30d 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzPineconeOrganization_Delete : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.RemoveAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs index bd060d2192..facab71e8b 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzPineconeOrganization_DeleteViaIdentity : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.RemoveAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs index 509df61a4a..b709c04e38 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzPineconeOrganization_UpdateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -833,24 +819,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs index 771684f901..ac9c6c9547 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzPineconeOrganization_UpdateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs index 0f5637879c..2d39c3b052 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzPineconeOrganization_UpdateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs index c2e5d22dcf..a53aac55f7 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzPineconeOrganization_UpdateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -475,11 +466,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.UpdateAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -916,24 +902,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs index a26481c1e1..cfac090eef 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzPineconeOrganization_UpdateViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -432,11 +423,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.UpdateAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -896,24 +882,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs index 17b6328306..76832b7f1f 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzQumuloFileSystem_CreateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -418,11 +409,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -764,24 +750,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs index 20ab469ca8..f8582c51b3 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzQumuloFileSystem_CreateViaIdentityExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -375,11 +366,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -742,24 +728,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs index a3be22e379..db6b690a39 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzQumuloFileSystem_CreateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs index a77a81ea72..90d7e3b7fe 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzQumuloFileSystem_CreateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs index af1f9044e0..1f7d03e628 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzQumuloFileSystem_Delete : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.RemoveAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs index 575bdc7e78..fff9316a2c 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzQumuloFileSystem_DeleteViaIdentity : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.RemoveAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs index b4960f0d68..8b9c408c5f 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzQumuloFileSystem_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -419,11 +410,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -765,24 +751,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs index ab37dd741d..35ffc3259c 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzQumuloFileSystem_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs index eb533c566c..8220f5f2d6 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzQumuloFileSystem_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs index 5d62f490e1..59a5ee55cd 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzQumuloFileSystem_UpdateExpanded : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -407,11 +398,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.UpdateAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -824,24 +810,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs index e0a40fe619..0dfa2b10a2 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -364,11 +355,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.UpdateAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -804,24 +790,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs index ac779f0915..ea5254d3d9 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSphereCatalog_CreateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Azure Sphere catalog private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -271,11 +262,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs index 906c9fb8f5..1e7eaff6b0 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSphereCatalog_CreateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs index 161408b561..204c65e9b7 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSphereCatalog_CreateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs index 5af7b51b46..acba694508 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDeployment_CreateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An deployment resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -321,11 +312,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs index 715bbe49b2..5be518efff 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeployment_CreateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -311,11 +302,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs index 0e858fa1f3..51d4403005 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeployment_CreateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs index be1ca14812..f8747b96cb 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs index ca6cd20875..ba3991e236 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalog /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs index 5f116a2d02..307804d72e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceG /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -238,11 +229,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs index 674ba52f2c..5ba4cfa308 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProduct /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -253,11 +244,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs index cd22604305..2d5e3a1a71 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs index c93473285b..7fa96e3228 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonString : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -306,11 +297,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -626,24 +612,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs index 857a1a0ef3..33dff90a62 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDeviceGroup_CreateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device group resource belonging to a product resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -660,24 +646,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs index 70d00584aa..f1a4502aa6 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeviceGroup_CreateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs index 66e516f9a8..4eb6c6c326 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeviceGroup_CreateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs index cce4b496c9..67995e1a55 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDevice_CreateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs index 646021c289..9de3243fea 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDevice_CreateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs index 0d7ab0cae3..f3ccab9443 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDevice_CreateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs index e1f49c1187..abd6b1df15 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSphereImage_CreateExpanded : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An image resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs index 88711281fc..95bba4975f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSphereImage_CreateViaJsonFilePath : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs index 5a4a2157e3..4ca127bee9 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSphereImage_CreateViaJsonString : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs index ceaa19a5db..21a211525e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzSphereProduct_CreateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An product resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs index ccbd7a2a5f..7ba6d5196e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class NewAzSphereProduct_CreateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs index 88327cdf55..775bae338d 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class NewAzSphereProduct_CreateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs index 26469c5fdf..ab4a4c9b68 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzSphereCatalog_Delete : global::System.Management.Au /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs index b9795508aa..024c8e4987 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzSphereCatalog_DeleteViaIdentity : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs index 9924a85f7d..70a3a17c20 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_Delete : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs index a2447d491e..f96dca7042 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentity : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs index 3118ad505c..52932dc2d6 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs index 7ae218c938..f61c02f426 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs index a44bb7b014..6796a03a29 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_Delete : global::System.Management.Au /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs index edd32a11d2..e6630e8efb 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_DeleteViaIdentity : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs index 7e2439e744..f75dd51d12 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_DeleteViaIdentityCatalog : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs index 5092c8958e..cb86e5b75b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzSphereCatalog_UpdateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Azure Sphere catalog private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -272,11 +263,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs index 2f948fc5ac..b46ac2159f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzSphereCatalog_UpdateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs index e3a715f0a3..179b804e04 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzSphereCatalog_UpdateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs index d4160079ee..962650be83 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDeployment_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An deployment resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -322,11 +313,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -642,24 +628,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs index 3eaf13ad59..0b79274ef2 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDeployment_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -312,11 +303,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -632,24 +618,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs index a83b4c4cba..a37b67b4a0 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDeployment_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs index 4b2b89520e..b441580f88 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDeviceGroup_UpdateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device group resource belonging to a product resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -341,11 +332,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -661,24 +647,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs index ba0e39d243..f1096f4f4c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDeviceGroup_UpdateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -295,11 +286,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs index 78a95800af..5d75a6a8d1 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDeviceGroup_UpdateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs index e935b16d4e..8b759d2087 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDevice_UpdateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs index e3f5555227..0c3dfed71f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDevice_UpdateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -311,11 +302,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs index ac95ca5a59..6f4e8517aa 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDevice_UpdateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs index 788c8ce6ed..1ac6375de9 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzSphereImage_UpdateExpanded : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An image resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -300,11 +291,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -620,24 +606,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs index 93bd1f34e1..55e346957b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzSphereImage_UpdateViaJsonFilePath : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs index 2e45b61e7f..d44e5bbe34 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzSphereImage_UpdateViaJsonString : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs index f406cb1f81..f4c379c372 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class SetAzSphereProduct_UpdateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An product resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs index 828059b077..bbdd558abe 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class SetAzSphereProduct_UpdateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs index d6fc720c98..49758ed5f2 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class SetAzSphereProduct_UpdateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs index 4a537ada8a..63eaecd6cd 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -660,24 +646,7 @@ public UpdateAzSphereDeviceGroup_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs index 05d305f11e..67c824b5fa 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -300,11 +291,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs index 4935accac9..315b6a1c46 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -267,11 +258,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs index d07e826515..7904bf4291 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs index 248773cad3..a23387add0 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs index fd274365d9..e57e94bbce 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs index a327d369ba..c5e3d3612b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzSphereDevice_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs index f89029421c..b8b52dc203 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,24 +593,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs index 8cd2564bf3..54c2060a7e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs index 680887450e..a1b8fc53a7 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -571,24 +557,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs index f51354e12c..d0c993462a 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityProductExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -251,11 +242,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs index 3123dd3b60..d35e30498b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzSphereDevice_UpdateViaJsonFilePath : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ public UpdateAzSphereDevice_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs index 372e657542..1043efb032 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzSphereDevice_UpdateViaJsonString : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzSphereDevice_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs index 70e3435da3..4842a4c149 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereProduct_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs index 0743c99398..b55dfae201 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ public UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs index a81aa6cd06..ea44e0b528 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateViaIdentityExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ public UpdateAzSphereProduct_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs index 563aa29539..7d6932b202 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class UpdateAzSphereProduct_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ public UpdateAzSphereProduct_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs index 03b0e15e4c..d61cea24f5 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class UpdateAzSphereProduct_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereProduct_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs index 51e78aa038..cc0f1f8938 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -342,11 +333,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -662,24 +648,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs index 791dfa8845..fe84fcd9e0 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -640,24 +626,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs index 9182aa52e6..339513107a 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs index 64a6858f95..de372c8ccf 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs index 0f7b146e21..e680ee01ad 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -325,11 +316,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -645,24 +631,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs index d3966add05..0f0d6c044e 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs index ba2632e053..2eee9af677 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs index 7b8b8901f5..9cd96c4585 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs index bcba0d4641..80fdbbf97d 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyContainerGroupPool_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs index 6e433cdbe1..03589dff20 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs index f217ddcaa2..19c9b0e83d 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs index 2562bb7519..85e157ba40 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs index 9f24926fa2..1043d198af 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -343,11 +334,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -663,24 +649,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs index 8e8c24fed9..354640b4a3 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs index b918c852bb..7ec899ffe0 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs index acd8c556c4..c93ea08b2b 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -326,11 +317,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -646,24 +632,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs index 2cb95e7f6d..f8c308b6bd 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs index 15f14be289..2ee9ba9c63 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs index 3b2efea127..b1f104856f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -290,11 +281,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs index 2e489cd95b..6717cadf40 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index c452597345..f8816acd6b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -590,24 +576,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs index 7f5c22c1b9..b73c88aa3c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs index 2a7ce1e357..9536d626db 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs index fbc0641204..74585f2df0 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs index fffd4aef09..69d04cb00c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaId /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index 58c14ff13c..282bec2f8f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaId /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs index b56d27931a..085e17895c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJs /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs index a4ecaca3a2..fe3663969f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJs /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs index 20cde6b927..295d00159e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs index 017841b668..78cbd10c04 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index 50911b3b71..7c130fec1d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs index 5e65ff313b..397a387e47 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFil /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs index 67e106168d..ac7befe1cf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonStr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs index 473f020399..f718b6810a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -350,11 +341,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -696,24 +682,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs index 61b508d168..7df303c1e9 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -307,11 +298,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -675,24 +661,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs index 0e9d6488de..608801a23b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs index e2d1f67129..2d934ad6dc 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs index aa46fde91a..dfe285e1ad 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs index d7163225c1..32d354815e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs index 4e208f8002..a2469a4de8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs index 4f78608b75..4fe1001f21 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs index 355e442de1..01c21590b2 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs index 98f0d12c00..17a5c5a0ad 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -239,11 +230,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs index 21b09fca80..2c13aa0627 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs index fa37bc6348..d69c53138a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs index d69845b918..6f2092a7fd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -238,11 +229,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs index ec3e638751..7dd68c22a6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapVirtualInstance_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs index 0bdc7231bc..0e22b45559 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs index f8055d790a..f166f5db8a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs index 428221db84..fcc220ff69 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs index 9bf4af3602..443f192ac6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs index 94a6a16de3..a360a68111 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs index f7c11b7ecf..d475bc41dd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index 56fbdea0b8..52b57fa397 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs index 0aded79a15..563a0f0723 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs index 155823f09b..56c619edb1 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs index a04abff0bf..7b4181267b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_Start : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs index 31c4ff12e6..c062913559 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs index 9342148482..1148c7d004 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs index ffa825434e..627322697d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs index 02a1091b15..a73044fc5c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index f501b5bb48..650268ab04 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs index 1da3c0f40b..25548e1dc2 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs index 03c8ba1925..6e8fba428f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs index 6af98f42ac..80de65c5da 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_Start : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs index 7474c57771..244f80080e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs index b9479db620..8f0e7611fd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs index ca376dded6..2244b0ffc0 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs index 53de4c6ad8..20c3e3a9b1 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index 787cc5760b..c47eed8c44 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs index 93c28d1021..2e573ffa0a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs index 9f56623d01..d2ede54adc 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonSt /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs index 3c2908ce12..64c0b9f3e2 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs @@ -40,15 +40,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_Start : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs index 1c22f46db4..b29215500b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs @@ -43,15 +43,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs index 6c812405f9..64b8f1fbf6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs @@ -40,15 +40,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -560,24 +546,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs index 2d85e2c426..3fda5daead 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs index 295acccebc..d0c09cd274 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFil /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs index 39e2118106..ef64f1a767 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonStr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs index a30ce12bdb..169c14c1fd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_Stop : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs index 0843e29446..7af8bba208 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs index 52ac2108b9..56e9089dbe 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs index fea8fd6ce9..5580b3daeb 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs index acd06e09eb..2d66aa3b5b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index 52fbc61626..8b26f74e91 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs index 020fe9459b..67a91252ce 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs index 5f0626ec28..3c29759d2b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs index 7e0e34af8e..947dad637e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_Stop : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs index 79ae8d71a5..fefb14b408 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs index 903eb38c08..005fa37072 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs index 315f404328..0f5a2bde7a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs index b7ff3b90b5..7fa2301c26 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index 26a1bdd62e..a57e4f74ef 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs index e42a535011..bb65488d27 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs index 0a6b00df0d..6b4b54f9cc 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs index 542c4b7884..ee27d91ef7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_Stop : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs index 9a531fdd8c..727ab93797 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs index 0b7f8880c0..60487bef9b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs index 26cc06b489..cd1b205867 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs index 8201adb47e..4775c73748 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index c3d0430cb2..808a1ab358 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs index 6ebb960598..e7dfc3192c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs index 163373d400..b841dc1c1a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs index a266a4cbf7..c589a1b675 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs @@ -40,15 +40,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_Stop : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs index 8cb1b55fa3..05faa8eabf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs @@ -43,15 +43,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs index 4b8b05ccb3..4d658bdc0e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs @@ -40,15 +40,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -560,24 +546,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs index 3ecd9e850e..bbc0945acf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs index f114e2e1c2..6d4db0b65a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs index cd6c5f56fa..90253d72a6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs index 463f0a0b8f..c0aa31b868 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -315,11 +306,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.UpdateAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -696,24 +682,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs index cae68cd678..93d4b5195d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -272,11 +263,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.UpdateAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -677,24 +663,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } }