diff --git a/powershell/cmdlets/class.ts b/powershell/cmdlets/class.ts
index 34b9997c42d..d111b61989c 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 8b73395002a..dde7dbe58b0 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 1128038346d..0774cff0d12 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 8adf063945e..8bbce0c44d7 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 675a6c9408d..2cd3fe4fa08 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 b6fa5a3fcd0..187ee009e60 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 8c2b06bcebf..e61ec46ad19 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 d65a67a42c8..a34ea6d38a0 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 ca592675e6a..b74d29b6916 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 f8fd7be2b00..5a4e6276ef7 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 3a845c957a5..68b7e31ccac 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 205ca0736c3..d61ac0890df 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 cf59f24002f..91b40b740aa 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 93e2f3c784c..0ac8cc399f6 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 b41d173022d..ee7ec5daa14 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 35265b14f32..58d7efe6fb1 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 1c364c670d4..206b01eba4c 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 dafbb8f4a53..366d26ae1c1 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 db41063c0b1..30da898ba48 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 28803bfe667..1b6e0a09f62 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 e475788c456..3b15c38ccf9 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 5c17fa6aa1e..a437f57d99f 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 6c0e6911573..7e57a687eff 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 8c522e4344c..de62609a867 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 4f6c11a350b..3fefe5cc2b1 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 8d057660db4..038197053c1 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 1e6cfd4fb47..55b1cdb08e2 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 81386961a93..4f5a455f24f 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 5fddd0c5680..eb0c3b77027 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 34c84133879..7bf9de6949c 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 1738d49869b..aa988741c67 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 0ee512d6dcd..3d942fc5bea 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 10a33ce852a..708504b7ad9 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 8d83db71fa0..aa67ecaba08 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 a17067f2fc9..0f46fb60a95 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 877ca57d575..78e69eef851 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 10427274e59..68cf492949d 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 a23177f0f77..03b8430bd8b 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 49d4a32edf6..b38270b4558 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 5db782eb1f0..024b7c027ac 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 d98174070ba..d8c65ae2fcf 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 d32430dcd88..d39adea42d7 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 658f4ab86d7..6ddad2a686c 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 43b4f87a825..e8123c686d6 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 43066ae7249..1962e68e8a3 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 94d6cef518c..26a0fd5cb28 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 94d6b99bdbe..85b530b7750 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 2604258ab52..93537a48974 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 696af615167..7691aeb0f63 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 6f35a8e0298..1bf4b522edb 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 640ed50c044..1e0bc3f6959 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 29a70db96f8..35d6d09b405 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 82a573f5dd6..0416426efaa 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 6b2f4257ed2..c4535cc62b9 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 f172481d60e..f2015a3dbe1 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 6b5f40d28c6..3e7a997ac99 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 7543825e527..1156d0bd398 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 d64b6ee65e3..8f825cccf8b 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 74d9b466e7c..d1d54692ee8 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 9e6cd0633d0..0787ead71d7 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 9ec1b5cb7b5..837795eaed7 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 a2a3f65369c..a08e6356e5a 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 fe8d827b3d3..4f12f6db2ab 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 7c4dc7d111d..d91f55d290e 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 8aa7f952bf1..378611985f0 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 d4b1c4d859d..097d6965c79 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 aa1f9025c2e..7e0cdc373ae 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 ab3c5bc867a..df4f3770cde 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 1fa2b411e45..4802432e275 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 dc113100ead..b257ee98f02 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 38896488999..d433e7f3b39 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 f186fe6f9c7..cb017d044da 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 c5434c3f7ee..f60e009cbdb 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 ba2ed7cecd0..451e6574877 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 acd688c13a7..125fcf59216 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 f90d8a0014f..ef48a4386f9 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 faab402983f..b9afc9980ce 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 750158f2b4c..bc1889dadbf 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 f9481c493c3..989094bd19e 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 32e89aefc65..c64ba572901 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 7ea3a75af17..5c2f4840f8c 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 f19c6985e55..5db7cb7068a 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 f023c149f51..b08b8f51c5a 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 a120bf4ab8a..d6480d52391 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 83b243e6f0e..ce19a5720a6 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 c76f5121841..f4685133539 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 dbb961e0648..788cff43f4f 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 41ee531f30d..3bd09c6be93 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 af2ccf1eaf0..a1e42534db4 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 196f98dabfd..26595412a18 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 95af72d6986..a3583d02213 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 6abdfb4b726..cbed28d9be9 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 9069c2a2c44..3cc322df104 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 cfda9caa353..7f6b963a413 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 e7414847400..7812e9449ca 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 3f681d7f6a8..15126eb8135 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 6d1bc26be1f..87f061891f0 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 2f0ee198e8b..fcf7adddcb3 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 de45bc63d7f..674adecd71f 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 a806d59a4f0..e0e2531fee4 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 e3859d845ca..bed24673c32 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 a09c6ef2de2..378fa1968d1 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 fe64c6ab8fb..96f6811d1a7 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 4b8410dfcd7..e27fecfeae2 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 454c7c78f0a..9129647cc07 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 27772710881..c8decc95bde 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 9885186d8f6..0ee4595bedc 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 d659c0620b0..9771620855d 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 096637c1789..fcc5590a6e0 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 67260afd57a..e753edf24f7 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 95d78e04d97..c59b0dc7ad6 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 6b956c4b32f..b4834ab7ced 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 7dcac2545b1..dada95302be 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 299b5dca1d4..7414354abad 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 42647bfed1b..27ac7dc93b3 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 679fb25b83d..f913ae85ab0 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 a7b1e296e2f..0be1c5d8d2b 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 0514d9ce02f..07bb487c05e 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 b63a0384164..b29c86efc6f 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 96d696f813f..cfed5a35816 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 f64b44daded..df98961a1cc 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 8690d8f0c4a..86ec4854288 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 9922a339581..d4273b4ffb0 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 3ae8c365646..c76f45755c6 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();
- ///