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();
- ///