From 6ecf8bdad2c3ec2c9f9344ec04511f8f443b9b4b Mon Sep 17 00:00:00 2001 From: Xiaogang Ding Date: Thu, 17 Jul 2025 17:36:20 +0800 Subject: [PATCH] Fixed asjob issue caused by view feature in v4 --- powershell/cmdlets/class.ts | 6 +-- ...anceAutomationDownloadSnapshot_Download.cs | 33 +--------------- ...mationDownloadSnapshot_DownloadExpanded.cs | 33 +--------------- ...ionDownloadSnapshot_DownloadViaIdentity.cs | 33 +--------------- ...oadSnapshot_DownloadViaIdentityExpanded.cs | 33 +--------------- ...nloadSnapshot_DownloadViaIdentityReport.cs | 33 +--------------- ...pshot_DownloadViaIdentityReportExpanded.cs | 33 +--------------- ...ownloadSnapshot_DownloadViaJsonFilePath.cs | 33 +--------------- ...nDownloadSnapshot_DownloadViaJsonString.cs | 33 +--------------- ...eAzAppComplianceAutomationFixReport_Fix.cs | 33 +--------------- ...ianceAutomationFixReport_FixViaIdentity.cs | 33 +--------------- ...AutomationOnboardProviderAction_Onboard.cs | 38 +------------------ ...onOnboardProviderAction_OnboardExpanded.cs | 38 +------------------ ...rdProviderAction_OnboardViaJsonFilePath.cs | 38 +------------------ ...oardProviderAction_OnboardViaJsonString.cs | 38 +------------------ ...mplianceAutomationReport_CreateExpanded.cs | 33 +--------------- ...omationReport_CreateViaIdentityExpanded.cs | 33 +--------------- ...eAutomationReport_CreateViaJsonFilePath.cs | 33 +--------------- ...nceAutomationReport_CreateViaJsonString.cs | 33 +--------------- ...eAzAppComplianceAutomationReport_Delete.cs | 14 ------- ...ianceAutomationReport_DeleteViaIdentity.cs | 14 ------- ...mplianceAutomationReport_UpdateExpanded.cs | 33 +--------------- ...eAutomationReport_UpdateViaJsonFilePath.cs | 33 +--------------- ...nceAutomationReport_UpdateViaJsonString.cs | 33 +--------------- ...omationProviderActionEvaluation_Trigger.cs | 33 +--------------- ...roviderActionEvaluation_TriggerExpanded.cs | 33 +--------------- ...ActionEvaluation_TriggerViaJsonFilePath.cs | 33 +--------------- ...erActionEvaluation_TriggerViaJsonString.cs | 33 +--------------- ...mplianceAutomationReportCertRecord_Sync.cs | 33 +--------------- ...AutomationReportCertRecord_SyncExpanded.cs | 33 +--------------- ...omationReportCertRecord_SyncViaIdentity.cs | 33 +--------------- ...eportCertRecord_SyncViaIdentityExpanded.cs | 33 +--------------- ...ionReportCertRecord_SyncViaJsonFilePath.cs | 33 +--------------- ...ationReportCertRecord_SyncViaJsonString.cs | 33 +--------------- ...tAzAppComplianceAutomationReport_Verify.cs | 33 +--------------- ...ianceAutomationReport_VerifyViaIdentity.cs | 33 +--------------- ...mplianceAutomationReport_UpdateExpanded.cs | 33 +--------------- ...omationReport_UpdateViaIdentityExpanded.cs | 33 +--------------- ...eAutomationReport_UpdateViaJsonFilePath.cs | 33 +--------------- ...nceAutomationReport_UpdateViaJsonString.cs | 33 +--------------- .../NewAzAstroOrganization_CreateExpanded.cs | 33 +--------------- ...oOrganization_CreateViaIdentityExpanded.cs | 33 +--------------- ...AstroOrganization_CreateViaJsonFilePath.cs | 33 +--------------- ...AzAstroOrganization_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzAstroOrganization_Delete.cs | 14 ------- ...veAzAstroOrganization_DeleteViaIdentity.cs | 14 ------- .../SetAzAstroOrganization_UpdateExpanded.cs | 33 +--------------- ...AstroOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...AzAstroOrganization_UpdateViaJsonString.cs | 33 +--------------- ...pdateAzAstroOrganization_UpdateExpanded.cs | 33 +--------------- ...oOrganization_UpdateViaIdentityExpanded.cs | 33 +--------------- .../NewAzComputeFleet_CreateExpanded.cs | 33 +--------------- ...zComputeFleet_CreateViaIdentityExpanded.cs | 33 +--------------- ...NewAzComputeFleet_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzComputeFleet_CreateViaJsonString.cs | 33 +--------------- .../cmdlets/RemoveAzComputeFleet_Delete.cs | 14 ------- .../RemoveAzComputeFleet_DeleteViaIdentity.cs | 14 ------- .../SetAzComputeFleet_UpdateExpanded.cs | 33 +--------------- ...SetAzComputeFleet_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzComputeFleet_UpdateViaJsonString.cs | 33 +--------------- .../UpdateAzComputeFleet_UpdateExpanded.cs | 33 +--------------- ...zComputeFleet_UpdateViaIdentityExpanded.cs | 33 +--------------- ...LargeInstanceAzureLargeInstance_Restart.cs | 33 +--------------- ...tanceAzureLargeInstance_RestartExpanded.cs | 33 +--------------- ...ceAzureLargeInstance_RestartViaIdentity.cs | 33 +--------------- ...argeInstance_RestartViaIdentityExpanded.cs | 33 +--------------- ...ureLargeInstance_RestartViaJsonFilePath.cs | 33 +--------------- ...AzureLargeInstance_RestartViaJsonString.cs | 33 +--------------- ...reLargeInstanceAzureLargeInstance_Start.cs | 33 +--------------- ...anceAzureLargeInstance_StartViaIdentity.cs | 33 +--------------- ...argeInstanceAzureLargeInstance_Shutdown.cs | 33 +--------------- ...eAzureLargeInstance_ShutdownViaIdentity.cs | 33 +--------------- .../NewAzCodeSigningAccount_CreateExpanded.cs | 33 +--------------- ...igningAccount_CreateViaIdentityExpanded.cs | 33 +--------------- ...odeSigningAccount_CreateViaJsonFilePath.cs | 33 +--------------- ...zCodeSigningAccount_CreateViaJsonString.cs | 33 +--------------- ...igningCertificateProfile_CreateExpanded.cs | 33 +--------------- ...teViaIdentityCodeSigningAccountExpanded.cs | 33 +--------------- ...ficateProfile_CreateViaIdentityExpanded.cs | 33 +--------------- ...ertificateProfile_CreateViaJsonFilePath.cs | 33 +--------------- ...gCertificateProfile_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzCodeSigningAccount_Delete.cs | 14 ------- ...eAzCodeSigningAccount_DeleteViaIdentity.cs | 14 ------- ...eAzCodeSigningCertificateProfile_Delete.cs | 14 ------- ...ingCertificateProfile_DeleteViaIdentity.cs | 14 ------- ...ile_DeleteViaIdentityCodeSigningAccount.cs | 14 ------- ...dateAzCodeSigningAccount_UpdateExpanded.cs | 33 +--------------- ...igningAccount_UpdateViaIdentityExpanded.cs | 33 +--------------- ...odeSigningAccount_UpdateViaJsonFilePath.cs | 33 +--------------- ...zCodeSigningAccount_UpdateViaJsonString.cs | 33 +--------------- ...igningCertificateProfile_UpdateExpanded.cs | 33 +--------------- ...teViaIdentityCodeSigningAccountExpanded.cs | 33 +--------------- ...ficateProfile_UpdateViaIdentityExpanded.cs | 33 +--------------- ...stryAssetEndpointProfile_CreateExpanded.cs | 33 +--------------- ...dpointProfile_CreateViaIdentityExpanded.cs | 33 +--------------- ...etEndpointProfile_CreateViaJsonFilePath.cs | 33 +--------------- ...ssetEndpointProfile_CreateViaJsonString.cs | 33 +--------------- ...NewAzDeviceRegistryAsset_CreateExpanded.cs | 33 +--------------- ...RegistryAsset_CreateViaIdentityExpanded.cs | 33 +--------------- ...viceRegistryAsset_CreateViaJsonFilePath.cs | 33 +--------------- ...DeviceRegistryAsset_CreateViaJsonString.cs | 33 +--------------- ...viceRegistryAssetEndpointProfile_Delete.cs | 14 ------- ...yAssetEndpointProfile_DeleteViaIdentity.cs | 14 ------- .../RemoveAzDeviceRegistryAsset_Delete.cs | 14 ------- ...AzDeviceRegistryAsset_DeleteViaIdentity.cs | 14 ------- ...iceRegistryAssetEndpointProfile_Replace.cs | 33 +--------------- ...tryAssetEndpointProfile_ReplaceExpanded.cs | 33 +--------------- ...tEndpointProfile_ReplaceViaJsonFilePath.cs | 33 +--------------- ...setEndpointProfile_ReplaceViaJsonString.cs | 33 +--------------- .../SetAzDeviceRegistryAsset_Replace.cs | 33 +--------------- ...etAzDeviceRegistryAsset_ReplaceExpanded.cs | 33 +--------------- ...iceRegistryAsset_ReplaceViaJsonFilePath.cs | 33 +--------------- ...eviceRegistryAsset_ReplaceViaJsonString.cs | 33 +--------------- ...stryAssetEndpointProfile_UpdateExpanded.cs | 33 +--------------- ...dpointProfile_UpdateViaIdentityExpanded.cs | 33 +--------------- ...etEndpointProfile_UpdateViaJsonFilePath.cs | 33 +--------------- ...ssetEndpointProfile_UpdateViaJsonString.cs | 33 +--------------- ...ateAzDeviceRegistryAsset_UpdateExpanded.cs | 33 +--------------- ...RegistryAsset_UpdateViaIdentityExpanded.cs | 33 +--------------- ...viceRegistryAsset_UpdateViaJsonFilePath.cs | 33 +--------------- ...DeviceRegistryAsset_UpdateViaJsonString.cs | 33 +--------------- ...MongoClusterPromoteMongoCluster_Promote.cs | 14 ------- ...sterPromoteMongoCluster_PromoteExpanded.cs | 14 ------- ...rPromoteMongoCluster_PromoteViaIdentity.cs | 14 ------- ...MongoCluster_PromoteViaIdentityExpanded.cs | 14 ------- ...moteMongoCluster_PromoteViaJsonFilePath.cs | 14 ------- ...romoteMongoCluster_PromoteViaJsonString.cs | 14 ------- ...MongoClusterFirewallRule_CreateExpanded.cs | 33 +--------------- ...rFirewallRule_CreateViaIdentityExpanded.cs | 33 +--------------- ...e_CreateViaIdentityMongoClusterExpanded.cs | 33 +--------------- ...usterFirewallRule_CreateViaJsonFilePath.cs | 33 +--------------- ...ClusterFirewallRule_CreateViaJsonString.cs | 33 +--------------- .../NewAzMongoCluster_CreateExpanded.cs | 33 +--------------- ...zMongoCluster_CreateViaIdentityExpanded.cs | 33 +--------------- ...NewAzMongoCluster_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzMongoCluster_CreateViaJsonString.cs | 33 +--------------- ...RemoveAzMongoClusterFirewallRule_Delete.cs | 14 ------- ...goClusterFirewallRule_DeleteViaIdentity.cs | 14 ------- ...ewallRule_DeleteViaIdentityMongoCluster.cs | 14 ------- .../cmdlets/RemoveAzMongoCluster_Delete.cs | 14 ------- .../RemoveAzMongoCluster_DeleteViaIdentity.cs | 14 ------- ...MongoClusterFirewallRule_UpdateExpanded.cs | 33 +--------------- ...usterFirewallRule_UpdateViaJsonFilePath.cs | 33 +--------------- ...ClusterFirewallRule_UpdateViaJsonString.cs | 33 +--------------- .../SetAzMongoCluster_UpdateExpanded.cs | 33 +--------------- ...SetAzMongoCluster_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzMongoCluster_UpdateViaJsonString.cs | 33 +--------------- ...MongoClusterFirewallRule_UpdateExpanded.cs | 33 +--------------- ...rFirewallRule_UpdateViaIdentityExpanded.cs | 33 +--------------- ...e_UpdateViaIdentityMongoClusterExpanded.cs | 33 +--------------- .../UpdateAzMongoCluster_UpdateExpanded.cs | 33 +--------------- ...zMongoCluster_UpdateViaIdentityExpanded.cs | 33 +--------------- ...ateAzMongoCluster_UpdateViaJsonFilePath.cs | 33 +--------------- ...pdateAzMongoCluster_UpdateViaJsonString.cs | 33 +--------------- ...ataAiServicesDeidService_CreateExpanded.cs | 33 +--------------- ...esDeidService_CreateViaIdentityExpanded.cs | 33 +--------------- ...rvicesDeidService_CreateViaJsonFilePath.cs | 33 +--------------- ...ServicesDeidService_CreateViaJsonString.cs | 33 +--------------- ...zHealthDataAiServicesDeidService_Delete.cs | 14 ------- ...AiServicesDeidService_DeleteViaIdentity.cs | 14 ------- ...ataAiServicesDeidService_UpdateExpanded.cs | 33 +--------------- ...esDeidService_UpdateViaIdentityExpanded.cs | 33 +--------------- ...zInformaticaOrganization_CreateExpanded.cs | 33 +--------------- ...aOrganization_CreateViaIdentityExpanded.cs | 33 +--------------- ...aticaOrganization_CreateViaJsonFilePath.cs | 33 +--------------- ...rmaticaOrganization_CreateViaJsonString.cs | 33 +--------------- ...rmaticaServerlessRuntime_CreateExpanded.cs | 33 +--------------- ...erlessRuntime_CreateViaIdentityExpanded.cs | 33 +--------------- ...e_CreateViaIdentityOrganizationExpanded.cs | 33 +--------------- ...ServerlessRuntime_CreateViaJsonFilePath.cs | 33 +--------------- ...caServerlessRuntime_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzInformaticaOrganization_Delete.cs | 14 ------- ...formaticaOrganization_DeleteViaIdentity.cs | 14 ------- ...veAzInformaticaServerlessRuntime_Delete.cs | 14 ------- ...ticaServerlessRuntime_DeleteViaIdentity.cs | 14 ------- ...ssRuntime_DeleteViaIdentityOrganization.cs | 14 ------- ...zInformaticaOrganization_UpdateExpanded.cs | 33 +--------------- ...aticaOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...rmaticaOrganization_UpdateViaJsonString.cs | 33 +--------------- ...rmaticaServerlessRuntime_UpdateExpanded.cs | 33 +--------------- ...ServerlessRuntime_UpdateViaJsonFilePath.cs | 33 +--------------- ...caServerlessRuntime_UpdateViaJsonString.cs | 33 +--------------- ...chestratorRuntimeBgpPeer_CreateExpanded.cs | 33 +--------------- ...untimeBgpPeer_CreateViaIdentityExpanded.cs | 33 +--------------- ...torRuntimeBgpPeer_CreateViaJsonFilePath.cs | 33 +--------------- ...ratorRuntimeBgpPeer_CreateViaJsonString.cs | 33 +--------------- ...ratorRuntimeLoadBalancer_CreateExpanded.cs | 33 +--------------- ...eLoadBalancer_CreateViaIdentityExpanded.cs | 33 +--------------- ...ntimeLoadBalancer_CreateViaJsonFilePath.cs | 33 +--------------- ...RuntimeLoadBalancer_CreateViaJsonString.cs | 33 +--------------- ...ratorRuntimeStorageClass_CreateExpanded.cs | 33 +--------------- ...eStorageClass_CreateViaIdentityExpanded.cs | 33 +--------------- ...ntimeStorageClass_CreateViaJsonFilePath.cs | 33 +--------------- ...RuntimeStorageClass_CreateViaJsonString.cs | 33 +--------------- ...rOrchestratorRuntimeStorageClass_Delete.cs | 14 ------- ...orRuntimeStorageClass_DeleteViaIdentity.cs | 14 ------- ...chestratorRuntimeBgpPeer_UpdateExpanded.cs | 33 +--------------- ...torRuntimeBgpPeer_UpdateViaJsonFilePath.cs | 33 +--------------- ...ratorRuntimeBgpPeer_UpdateViaJsonString.cs | 33 +--------------- ...ratorRuntimeLoadBalancer_UpdateExpanded.cs | 33 +--------------- ...ntimeLoadBalancer_UpdateViaJsonFilePath.cs | 33 +--------------- ...RuntimeLoadBalancer_UpdateViaJsonString.cs | 33 +--------------- ...ratorRuntimeStorageClass_UpdateExpanded.cs | 33 +--------------- ...ntimeStorageClass_UpdateViaJsonFilePath.cs | 33 +--------------- ...RuntimeStorageClass_UpdateViaJsonString.cs | 33 +--------------- ...chestratorRuntimeBgpPeer_UpdateExpanded.cs | 33 +--------------- ...untimeBgpPeer_UpdateViaIdentityExpanded.cs | 33 +--------------- ...ratorRuntimeLoadBalancer_UpdateExpanded.cs | 33 +--------------- ...eLoadBalancer_UpdateViaIdentityExpanded.cs | 33 +--------------- ...ratorRuntimeStorageClass_UpdateExpanded.cs | 33 +--------------- ...eStorageClass_UpdateViaIdentityExpanded.cs | 33 +--------------- ...ntimeStorageClass_UpdateViaJsonFilePath.cs | 33 +--------------- ...RuntimeStorageClass_UpdateViaJsonString.cs | 33 +--------------- ...AzLambdaTestOrganization_CreateExpanded.cs | 33 +--------------- ...tOrganization_CreateViaIdentityExpanded.cs | 33 +--------------- ...aTestOrganization_CreateViaJsonFilePath.cs | 33 +--------------- ...bdaTestOrganization_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzLambdaTestOrganization_Delete.cs | 14 ------- ...ambdaTestOrganization_DeleteViaIdentity.cs | 14 ------- ...AzLambdaTestOrganization_UpdateExpanded.cs | 33 +--------------- ...aTestOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...bdaTestOrganization_UpdateViaJsonString.cs | 33 +--------------- ...AzLambdaTestOrganization_UpdateExpanded.cs | 33 +--------------- ...tOrganization_UpdateViaIdentityExpanded.cs | 33 +--------------- ...wAzWeightsBiasesInstance_CreateExpanded.cs | 33 +--------------- ...iasesInstance_CreateViaIdentityExpanded.cs | 33 +--------------- ...htsBiasesInstance_CreateViaJsonFilePath.cs | 33 +--------------- ...ightsBiasesInstance_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzWeightsBiasesInstance_Delete.cs | 14 ------- ...WeightsBiasesInstance_DeleteViaIdentity.cs | 14 ------- ...tAzWeightsBiasesInstance_UpdateExpanded.cs | 33 +--------------- ...htsBiasesInstance_UpdateViaJsonFilePath.cs | 33 +--------------- ...ightsBiasesInstance_UpdateViaJsonString.cs | 33 +--------------- ...eAzWeightsBiasesInstance_UpdateExpanded.cs | 33 +--------------- ...iasesInstance_UpdateViaIdentityExpanded.cs | 33 +--------------- ...DevOpsInfrastructurePool_CreateExpanded.cs | 33 +--------------- ...structurePool_CreateViaIdentityExpanded.cs | 33 +--------------- ...nfrastructurePool_CreateViaJsonFilePath.cs | 33 +--------------- ...sInfrastructurePool_CreateViaJsonString.cs | 33 +--------------- ...RemoveAzDevOpsInfrastructurePool_Delete.cs | 14 ------- ...OpsInfrastructurePool_DeleteViaIdentity.cs | 14 ------- ...DevOpsInfrastructurePool_UpdateExpanded.cs | 33 +--------------- ...nfrastructurePool_UpdateViaJsonFilePath.cs | 33 +--------------- ...sInfrastructurePool_UpdateViaJsonString.cs | 33 +--------------- ...DevOpsInfrastructurePool_UpdateExpanded.cs | 33 +--------------- ...structurePool_UpdateViaIdentityExpanded.cs | 33 +--------------- ...NeonPostgresOrganization_CreateExpanded.cs | 33 +--------------- ...sOrganization_CreateViaIdentityExpanded.cs | 33 +--------------- ...tgresOrganization_CreateViaJsonFilePath.cs | 33 +--------------- ...ostgresOrganization_CreateViaJsonString.cs | 33 +--------------- ...RemoveAzNeonPostgresOrganization_Delete.cs | 14 ------- ...nPostgresOrganization_DeleteViaIdentity.cs | 14 ------- ...NeonPostgresOrganization_UpdateExpanded.cs | 33 +--------------- ...tgresOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...ostgresOrganization_UpdateViaJsonString.cs | 33 +--------------- ...NeonPostgresOrganization_UpdateExpanded.cs | 33 +--------------- ...sOrganization_UpdateViaIdentityExpanded.cs | 33 +--------------- ...tgresOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...ostgresOrganization_UpdateViaJsonString.cs | 33 +--------------- ...workAnalyticsDataProduct_CreateExpanded.cs | 33 +--------------- ...csDataProduct_CreateViaIdentityExpanded.cs | 33 +--------------- ...lyticsDataProduct_CreateViaJsonFilePath.cs | 33 +--------------- ...nalyticsDataProduct_CreateViaJsonString.cs | 33 +--------------- ...NetworkAnalyticsDataType_CreateExpanded.cs | 33 +--------------- ...pe_CreateViaIdentityDataProductExpanded.cs | 33 +--------------- ...yticsDataType_CreateViaIdentityExpanded.cs | 33 +--------------- ...AnalyticsDataType_CreateViaJsonFilePath.cs | 33 +--------------- ...rkAnalyticsDataType_CreateViaJsonString.cs | 33 +--------------- ...oveAzNetworkAnalyticsDataProduct_Delete.cs | 14 ------- ...kAnalyticsDataProduct_DeleteViaIdentity.cs | 14 ------- ...veAzNetworkAnalyticsDataTypeData_Delete.cs | 14 ------- ...orkAnalyticsDataTypeData_DeleteExpanded.cs | 14 ------- ...AnalyticsDataTypeData_DeleteViaIdentity.cs | 14 ------- ...taTypeData_DeleteViaIdentityDataProduct.cs | 14 ------- ...ta_DeleteViaIdentityDataProductExpanded.cs | 14 ------- ...sDataTypeData_DeleteViaIdentityExpanded.cs | 14 ------- ...yticsDataTypeData_DeleteViaJsonFilePath.cs | 14 ------- ...alyticsDataTypeData_DeleteViaJsonString.cs | 14 ------- ...RemoveAzNetworkAnalyticsDataType_Delete.cs | 14 ------- ...workAnalyticsDataType_DeleteViaIdentity.cs | 14 ------- ...csDataType_DeleteViaIdentityDataProduct.cs | 14 ------- ...workAnalyticsDataProduct_UpdateExpanded.cs | 33 +--------------- ...csDataProduct_UpdateViaIdentityExpanded.cs | 33 +--------------- ...NetworkAnalyticsDataType_UpdateExpanded.cs | 33 +--------------- ...pe_UpdateViaIdentityDataProductExpanded.cs | 33 +--------------- ...yticsDataType_UpdateViaIdentityExpanded.cs | 33 +--------------- ...AnalyticsDataType_UpdateViaJsonFilePath.cs | 33 +--------------- ...rkAnalyticsDataType_UpdateViaJsonString.cs | 33 +--------------- ...ewAzPineconeOrganization_CreateExpanded.cs | 33 +--------------- ...eOrganization_CreateViaIdentityExpanded.cs | 33 +--------------- ...econeOrganization_CreateViaJsonFilePath.cs | 33 +--------------- ...ineconeOrganization_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzPineconeOrganization_Delete.cs | 14 ------- ...zPineconeOrganization_DeleteViaIdentity.cs | 14 ------- ...etAzPineconeOrganization_UpdateExpanded.cs | 33 +--------------- ...econeOrganization_UpdateViaJsonFilePath.cs | 33 +--------------- ...ineconeOrganization_UpdateViaJsonString.cs | 33 +--------------- ...teAzPineconeOrganization_UpdateExpanded.cs | 33 +--------------- ...eOrganization_UpdateViaIdentityExpanded.cs | 33 +--------------- .../NewAzQumuloFileSystem_CreateExpanded.cs | 33 +--------------- ...uloFileSystem_CreateViaIdentityExpanded.cs | 33 +--------------- ...zQumuloFileSystem_CreateViaJsonFilePath.cs | 33 +--------------- ...wAzQumuloFileSystem_CreateViaJsonString.cs | 33 +--------------- .../RemoveAzQumuloFileSystem_Delete.cs | 14 ------- ...oveAzQumuloFileSystem_DeleteViaIdentity.cs | 14 ------- .../SetAzQumuloFileSystem_UpdateExpanded.cs | 33 +--------------- ...zQumuloFileSystem_UpdateViaJsonFilePath.cs | 33 +--------------- ...tAzQumuloFileSystem_UpdateViaJsonString.cs | 33 +--------------- ...UpdateAzQumuloFileSystem_UpdateExpanded.cs | 33 +--------------- ...uloFileSystem_UpdateViaIdentityExpanded.cs | 33 +--------------- .../NewAzSphereCatalog_CreateExpanded.cs | 33 +--------------- ...ewAzSphereCatalog_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzSphereCatalog_CreateViaJsonString.cs | 33 +--------------- .../NewAzSphereDeployment_CreateExpanded.cs | 33 +--------------- ...zSphereDeployment_CreateViaJsonFilePath.cs | 33 +--------------- ...wAzSphereDeployment_CreateViaJsonString.cs | 33 +--------------- ...eDeviceCapabilityImage_GenerateExpanded.cs | 33 +--------------- ...mage_GenerateViaIdentityCatalogExpanded.cs | 33 +--------------- ..._GenerateViaIdentityDeviceGroupExpanded.cs | 33 +--------------- ...mage_GenerateViaIdentityProductExpanded.cs | 33 +--------------- ...CapabilityImage_GenerateViaJsonFilePath.cs | 33 +--------------- ...ceCapabilityImage_GenerateViaJsonString.cs | 33 +--------------- .../NewAzSphereDeviceGroup_CreateExpanded.cs | 33 +--------------- ...SphereDeviceGroup_CreateViaJsonFilePath.cs | 33 +--------------- ...AzSphereDeviceGroup_CreateViaJsonString.cs | 33 +--------------- .../NewAzSphereDevice_CreateExpanded.cs | 33 +--------------- ...NewAzSphereDevice_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzSphereDevice_CreateViaJsonString.cs | 33 +--------------- .../NewAzSphereImage_CreateExpanded.cs | 33 +--------------- .../NewAzSphereImage_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzSphereImage_CreateViaJsonString.cs | 33 +--------------- .../NewAzSphereProduct_CreateExpanded.cs | 33 +--------------- ...ewAzSphereProduct_CreateViaJsonFilePath.cs | 33 +--------------- .../NewAzSphereProduct_CreateViaJsonString.cs | 33 +--------------- .../cmdlets/RemoveAzSphereCatalog_Delete.cs | 14 ------- ...RemoveAzSphereCatalog_DeleteViaIdentity.cs | 14 ------- .../RemoveAzSphereDeviceGroup_Delete.cs | 14 ------- ...veAzSphereDeviceGroup_DeleteViaIdentity.cs | 14 ------- ...ereDeviceGroup_DeleteViaIdentityCatalog.cs | 14 ------- ...ereDeviceGroup_DeleteViaIdentityProduct.cs | 14 ------- .../cmdlets/RemoveAzSphereProduct_Delete.cs | 14 ------- ...RemoveAzSphereProduct_DeleteViaIdentity.cs | 14 ------- ...zSphereProduct_DeleteViaIdentityCatalog.cs | 14 ------- .../SetAzSphereCatalog_UpdateExpanded.cs | 33 +--------------- ...etAzSphereCatalog_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzSphereCatalog_UpdateViaJsonString.cs | 33 +--------------- .../SetAzSphereDeployment_UpdateExpanded.cs | 33 +--------------- ...zSphereDeployment_UpdateViaJsonFilePath.cs | 33 +--------------- ...tAzSphereDeployment_UpdateViaJsonString.cs | 33 +--------------- .../SetAzSphereDeviceGroup_UpdateExpanded.cs | 33 +--------------- ...SphereDeviceGroup_UpdateViaJsonFilePath.cs | 33 +--------------- ...AzSphereDeviceGroup_UpdateViaJsonString.cs | 33 +--------------- .../SetAzSphereDevice_UpdateExpanded.cs | 33 +--------------- ...SetAzSphereDevice_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzSphereDevice_UpdateViaJsonString.cs | 33 +--------------- .../SetAzSphereImage_UpdateExpanded.cs | 33 +--------------- .../SetAzSphereImage_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzSphereImage_UpdateViaJsonString.cs | 33 +--------------- .../SetAzSphereProduct_UpdateExpanded.cs | 33 +--------------- ...etAzSphereProduct_UpdateViaJsonFilePath.cs | 33 +--------------- .../SetAzSphereProduct_UpdateViaJsonString.cs | 33 +--------------- ...pdateAzSphereDeviceGroup_UpdateExpanded.cs | 33 +--------------- ...eGroup_UpdateViaIdentityCatalogExpanded.cs | 33 +--------------- ...reDeviceGroup_UpdateViaIdentityExpanded.cs | 33 +--------------- ...eGroup_UpdateViaIdentityProductExpanded.cs | 33 +--------------- ...SphereDeviceGroup_UpdateViaJsonFilePath.cs | 33 +--------------- ...AzSphereDeviceGroup_UpdateViaJsonString.cs | 33 +--------------- .../UpdateAzSphereDevice_UpdateExpanded.cs | 33 +--------------- ...Device_UpdateViaIdentityCatalogExpanded.cs | 33 +--------------- ...ce_UpdateViaIdentityDeviceGroupExpanded.cs | 33 +--------------- ...zSphereDevice_UpdateViaIdentityExpanded.cs | 33 +--------------- ...Device_UpdateViaIdentityProductExpanded.cs | 33 +--------------- ...ateAzSphereDevice_UpdateViaJsonFilePath.cs | 33 +--------------- ...pdateAzSphereDevice_UpdateViaJsonString.cs | 33 +--------------- .../UpdateAzSphereProduct_UpdateExpanded.cs | 33 +--------------- ...roduct_UpdateViaIdentityCatalogExpanded.cs | 33 +--------------- ...SphereProduct_UpdateViaIdentityExpanded.cs | 33 +--------------- ...teAzSphereProduct_UpdateViaJsonFilePath.cs | 33 +--------------- ...dateAzSphereProduct_UpdateViaJsonString.cs | 33 +--------------- ...tandbyContainerGroupPool_CreateExpanded.cs | 33 +--------------- ...inerGroupPool_CreateViaIdentityExpanded.cs | 33 +--------------- ...ontainerGroupPool_CreateViaJsonFilePath.cs | 33 +--------------- ...yContainerGroupPool_CreateViaJsonString.cs | 33 +--------------- ...tandbyVirtualMachinePool_CreateExpanded.cs | 33 +--------------- ...alMachinePool_CreateViaIdentityExpanded.cs | 33 +--------------- ...irtualMachinePool_CreateViaJsonFilePath.cs | 33 +--------------- ...yVirtualMachinePool_CreateViaJsonString.cs | 33 +--------------- ...dbyPoolStandbyContainerGroupPool_Delete.cs | 14 ------- ...dbyContainerGroupPool_DeleteViaIdentity.cs | 14 ------- ...dbyPoolStandbyVirtualMachinePool_Delete.cs | 14 ------- ...dbyVirtualMachinePool_DeleteViaIdentity.cs | 14 ------- ...tandbyContainerGroupPool_UpdateExpanded.cs | 33 +--------------- ...ontainerGroupPool_UpdateViaJsonFilePath.cs | 33 +--------------- ...yContainerGroupPool_UpdateViaJsonString.cs | 33 +--------------- ...tandbyVirtualMachinePool_UpdateExpanded.cs | 33 +--------------- ...irtualMachinePool_UpdateViaJsonFilePath.cs | 33 +--------------- ...yVirtualMachinePool_UpdateViaJsonString.cs | 33 +--------------- ...pplicationServerInstance_CreateExpanded.cs | 33 +--------------- ...erverInstance_CreateViaIdentityExpanded.cs | 33 +--------------- ...teViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...ionServerInstance_CreateViaJsonFilePath.cs | 33 +--------------- ...ationServerInstance_CreateViaJsonString.cs | 33 +--------------- ...SapCentralServerInstance_CreateExpanded.cs | 33 +--------------- ...erverInstance_CreateViaIdentityExpanded.cs | 33 +--------------- ...teViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...ralServerInstance_CreateViaJsonFilePath.cs | 33 +--------------- ...ntralServerInstance_CreateViaJsonString.cs | 33 +--------------- ...tanceSapDatabaseInstance_CreateExpanded.cs | 33 +--------------- ...abaseInstance_CreateViaIdentityExpanded.cs | 33 +--------------- ...teViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...pDatabaseInstance_CreateViaJsonFilePath.cs | 33 +--------------- ...SapDatabaseInstance_CreateViaJsonString.cs | 33 +--------------- ...stanceSapVirtualInstance_CreateExpanded.cs | 33 +--------------- ...rtualInstance_CreateViaIdentityExpanded.cs | 33 +--------------- ...apVirtualInstance_CreateViaJsonFilePath.cs | 33 +--------------- ...eSapVirtualInstance_CreateViaJsonString.cs | 33 +--------------- ...anceSapApplicationServerInstance_Delete.cs | 14 ------- ...icationServerInstance_DeleteViaIdentity.cs | 14 ------- ...nce_DeleteViaIdentitySapVirtualInstance.cs | 14 ------- ...InstanceSapCentralServerInstance_Delete.cs | 14 ------- ...CentralServerInstance_DeleteViaIdentity.cs | 14 ------- ...nce_DeleteViaIdentitySapVirtualInstance.cs | 14 ------- ...rtualInstanceSapDatabaseInstance_Delete.cs | 14 ------- ...ceSapDatabaseInstance_DeleteViaIdentity.cs | 14 ------- ...nce_DeleteViaIdentitySapVirtualInstance.cs | 14 ------- ...irtualInstanceSapVirtualInstance_Delete.cs | 14 ------- ...nceSapVirtualInstance_DeleteViaIdentity.cs | 14 ------- ...tanceSapApplicationServerInstance_Start.cs | 33 +--------------- ...ApplicationServerInstance_StartExpanded.cs | 33 +--------------- ...licationServerInstance_StartViaIdentity.cs | 33 +--------------- ...ServerInstance_StartViaIdentityExpanded.cs | 33 +--------------- ...ance_StartViaIdentitySapVirtualInstance.cs | 33 +--------------- ...rtViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...tionServerInstance_StartViaJsonFilePath.cs | 33 +--------------- ...cationServerInstance_StartViaJsonString.cs | 33 +--------------- ...lInstanceSapCentralServerInstance_Start.cs | 33 +--------------- ...eSapCentralServerInstance_StartExpanded.cs | 33 +--------------- ...pCentralServerInstance_StartViaIdentity.cs | 33 +--------------- ...ServerInstance_StartViaIdentityExpanded.cs | 33 +--------------- ...ance_StartViaIdentitySapVirtualInstance.cs | 33 +--------------- ...rtViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...tralServerInstance_StartViaJsonFilePath.cs | 33 +--------------- ...entralServerInstance_StartViaJsonString.cs | 33 +--------------- ...irtualInstanceSapDatabaseInstance_Start.cs | 33 +--------------- ...stanceSapDatabaseInstance_StartExpanded.cs | 33 +--------------- ...nceSapDatabaseInstance_StartViaIdentity.cs | 33 +--------------- ...tabaseInstance_StartViaIdentityExpanded.cs | 33 +--------------- ...ance_StartViaIdentitySapVirtualInstance.cs | 33 +--------------- ...rtViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...apDatabaseInstance_StartViaJsonFilePath.cs | 33 +--------------- ...eSapDatabaseInstance_StartViaJsonString.cs | 33 +--------------- ...VirtualInstanceSapVirtualInstance_Start.cs | 33 +--------------- ...nstanceSapVirtualInstance_StartExpanded.cs | 33 +--------------- ...anceSapVirtualInstance_StartViaIdentity.cs | 33 +--------------- ...irtualInstance_StartViaIdentityExpanded.cs | 33 +--------------- ...SapVirtualInstance_StartViaJsonFilePath.cs | 33 +--------------- ...ceSapVirtualInstance_StartViaJsonString.cs | 33 +--------------- ...stanceSapApplicationServerInstance_Stop.cs | 33 +--------------- ...pApplicationServerInstance_StopExpanded.cs | 33 +--------------- ...plicationServerInstance_StopViaIdentity.cs | 33 +--------------- ...nServerInstance_StopViaIdentityExpanded.cs | 33 +--------------- ...tance_StopViaIdentitySapVirtualInstance.cs | 33 +--------------- ...opViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...ationServerInstance_StopViaJsonFilePath.cs | 33 +--------------- ...icationServerInstance_StopViaJsonString.cs | 33 +--------------- ...alInstanceSapCentralServerInstance_Stop.cs | 33 +--------------- ...ceSapCentralServerInstance_StopExpanded.cs | 33 +--------------- ...apCentralServerInstance_StopViaIdentity.cs | 33 +--------------- ...lServerInstance_StopViaIdentityExpanded.cs | 33 +--------------- ...tance_StopViaIdentitySapVirtualInstance.cs | 33 +--------------- ...opViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...ntralServerInstance_StopViaJsonFilePath.cs | 33 +--------------- ...CentralServerInstance_StopViaJsonString.cs | 33 +--------------- ...VirtualInstanceSapDatabaseInstance_Stop.cs | 33 +--------------- ...nstanceSapDatabaseInstance_StopExpanded.cs | 33 +--------------- ...anceSapDatabaseInstance_StopViaIdentity.cs | 33 +--------------- ...atabaseInstance_StopViaIdentityExpanded.cs | 33 +--------------- ...tance_StopViaIdentitySapVirtualInstance.cs | 33 +--------------- ...opViaIdentitySapVirtualInstanceExpanded.cs | 33 +--------------- ...SapDatabaseInstance_StopViaJsonFilePath.cs | 33 +--------------- ...ceSapDatabaseInstance_StopViaJsonString.cs | 33 +--------------- ...pVirtualInstanceSapVirtualInstance_Stop.cs | 33 +--------------- ...InstanceSapVirtualInstance_StopExpanded.cs | 33 +--------------- ...tanceSapVirtualInstance_StopViaIdentity.cs | 33 +--------------- ...VirtualInstance_StopViaIdentityExpanded.cs | 33 +--------------- ...eSapVirtualInstance_StopViaJsonFilePath.cs | 33 +--------------- ...nceSapVirtualInstance_StopViaJsonString.cs | 33 +--------------- ...stanceSapVirtualInstance_UpdateExpanded.cs | 33 +--------------- ...rtualInstance_UpdateViaIdentityExpanded.cs | 33 +--------------- 489 files changed, 407 insertions(+), 14127 deletions(-) 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(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -223,11 +214,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs index 17a5a6b2f67..3854c20ade7 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -226,11 +217,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs index e4c6fa21cdf..2e5e4d19683 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -267,11 +258,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs index 7d2d9b3f8e5..70584c8fde3 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonString.cs @@ -39,15 +39,6 @@ public partial class InvokeAzMongoClusterPromoteMongoCluster_PromoteViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.InvokeAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs index d1f0fff111b..1833ecda37d 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,24 +593,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs index 47a05b0dfa7..058a66ba029 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -229,11 +220,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -573,24 +559,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs index 14109d4dd6f..ca521481486 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaIdentityMongoClusterExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaIdentityMongoCluster /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -247,11 +238,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -589,24 +575,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs index 3f3a9c5fdc7..b1e67069094 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs index 1499ac53496..7e9f6bb6ce5 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoClusterFirewallRule_CreateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class NewAzMongoClusterFirewallRule_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs index 015716a314b..f23ea60908d 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzMongoCluster_CreateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -450,11 +441,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -770,24 +756,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs index 9c21f34f0da..e08f25aa613 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzMongoCluster_CreateViaIdentityExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -407,11 +398,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -747,24 +733,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs index 951c9751603..08cf0de3cb2 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzMongoCluster_CreateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs index 1e48086b75e..777bd33ff0a 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/NewAzMongoCluster_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzMongoCluster_CreateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.NewAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs index 15c7c933e62..12e1f84fb3f 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs index 01feb9d3f41..1c3b94dbdbf 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs index 52939118918..66268370b22 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoCluster.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoClusterFirewallRule_DeleteViaIdentityMongoClus /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs index 00b6709ada4..40f66c9e1bd 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoCluster_Delete : global::System.Management.Aut /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs index 9777d5e3e46..90512f90bfc 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/RemoveAzMongoCluster_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzMongoCluster_DeleteViaIdentity : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.RemoveAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs index 6a0782fa094..fdc16e3e384 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class SetAzMongoClusterFirewallRule_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -608,24 +594,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs index bd9f48de16f..309613eff17 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class SetAzMongoClusterFirewallRule_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs index b8cfc4ac709..f83dc1c7520 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoClusterFirewallRule_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class SetAzMongoClusterFirewallRule_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs index 9a26dbc24cc..67cf30a3d5e 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzMongoCluster_UpdateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster resource. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoCluster(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -451,11 +442,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -771,24 +757,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs index 8963a7c51f2..66c1449529e 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzMongoCluster_UpdateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs index eba412765d6..d53e25858a6 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/SetAzMongoCluster_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzMongoCluster_UpdateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.SetAzMongoCluster /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs index 8d58db823d8..8f00066b57c 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -287,11 +278,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -621,24 +607,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs index a848662c633..afbb14a3142 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs index fa2712f92ca..70c12e664b0 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClusterExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzMongoClusterFirewallRule_UpdateViaIdentityMongoClus /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Represents a mongo cluster firewall rule. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.FirewallRule(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -247,11 +238,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -605,24 +591,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IFirewallRule var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs index 092940539ed..8912a151c69 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzMongoCluster_UpdateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the MongoCluster. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoClusterUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -383,11 +374,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -703,24 +689,7 @@ public UpdateAzMongoCluster_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs index 5e25079e72c..6556e718e43 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzMongoCluster_UpdateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the MongoCluster. private Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.MongoClusterUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The administrator password. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The administrator password.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -680,24 +666,7 @@ public UpdateAzMongoCluster_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs index aa0cdacb0dc..84006050ee1 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzMongoCluster_UpdateViaJsonFilePath : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ public UpdateAzMongoCluster_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs index ed78d0b4ef1..600a8a39fb4 100644 --- a/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/DocumentDB.MongoCluster.Management/target/generated/cmdlets/UpdateAzMongoCluster_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzMongoCluster_UpdateViaJsonString : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Category(global::Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Cmdlets.UpdateAzMongoClus /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ public UpdateAzMongoCluster_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.MongoCluster.Models.IMongoCluster var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs index 6ee299fb5bc..33c4e5d0694 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -295,11 +286,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs index 92769f97375..2f3dd4c7df7 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -254,11 +245,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -622,24 +608,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs index 3596efe69dc..ff730e54ae3 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaJsonFilePath /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs index 5f4e793cde1..67061aba390 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/NewAzHealthDataAiServicesDeidService_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzHealthDataAiServicesDeidService_CreateViaJsonString : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.NewAzHeal /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs index 2d32e826385..7efc369a93e 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzHealthDataAiServicesDeidService_Delete : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.RemoveAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs index 6b679a8fec7..ccb2daf9539 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzHealthDataAiServicesDeidService_DeleteViaIdentity : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.RemoveAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs index 9086bcc14d7..f55d72c45d6 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzHealthDataAiServicesDeidService_UpdateExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -284,11 +275,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.UpdateAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -657,24 +643,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs index 6257abd9c2b..561a84265c9 100644 --- a/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/HealthDataAIServices.Management/target/generated/cmdlets/UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzHealthDataAiServicesDeidService_UpdateViaIdentityEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A HealthDataAIServicesProviderHub resource private Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.DeidService(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Category(global::Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Cmdlets.UpdateAzH /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -640,24 +626,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.HealthDataAIServices.Models.IDeidService var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs index a9eda51f08e..840b4f24ac2 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaOrganization_CreateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -524,11 +515,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -844,24 +830,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs index 5569be26e19..58859cb9243 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaOrganization_CreateViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -481,11 +472,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -821,24 +807,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs index b7e524b3606..93dd4581240 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzInformaticaOrganization_CreateViaJsonFilePath : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs index b7e1ca4e46f..4f4c4421265 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzInformaticaOrganization_CreateViaJsonString : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs index 18e0f649f18..7aa70458331 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -434,11 +425,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -754,24 +740,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs index 8f39a61f004..8f2424fb1df 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -378,11 +369,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -722,24 +708,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs index 00f3bb18157..b807588d3dc 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganizationExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaIdentityOrganiza /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -394,11 +385,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -736,24 +722,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs index b6d8ffc0868..0e68a9cdece 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaJsonFilePath : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs index 502aa302f39..c8c41cd483d 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/NewAzInformaticaServerlessRuntime_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzInformaticaServerlessRuntime_CreateViaJsonString : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.NewAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs index 0fdbe106f5a..62e22cefcb2 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaOrganization_Delete : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs index 11e9bbb7177..96d7666e46d 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaOrganization_DeleteViaIdentity : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs index 7c1b3fd941a..513c7283df5 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs index aab3d8b42ff..cc494935c81 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs index 4e301c73dac..63f4456f51f 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrganization.cs @@ -38,15 +38,6 @@ public partial class RemoveAzInformaticaServerlessRuntime_DeleteViaIdentityOrgan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.RemoveAzInformatic /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs index d6d72994a82..47f26094e2f 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzInformaticaOrganization_UpdateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Organization Resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaOrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -525,11 +516,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -845,24 +831,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs index 201072c813a..8b8d2ea0cbb 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzInformaticaOrganization_UpdateViaJsonFilePath : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs index 93ae74b7cfd..37e1b0e6c95 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzInformaticaOrganization_UpdateViaJsonString : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaOr /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs index 52a55384c20..098afd400be 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateExpanded : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A Serverless Runtime environment resource by Informatica. private Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.InformaticaServerlessRuntimeResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// String KV pairs indicating Advanced custom properties. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "String KV pairs indicating Advanced custom properties.")] @@ -435,11 +426,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -755,24 +741,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs index ab19ec56381..8387d6239d4 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateViaJsonFilePath : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs index ebcebe2fd8d..8c7b2baed6b 100644 --- a/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Informatica.DataManagement.Management/target/generated/cmdlets/SetAzInformaticaServerlessRuntime_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzInformaticaServerlessRuntime_UpdateViaJsonString : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Informatica.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Informatica.Cmdlets.SetAzInformaticaSe /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Informatica.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Informatica.Models.IInformaticaServerlessRuntimeResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs index f5156dcf8a8..e3ac5e20e33 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs index 98f9da55de0..b22d9517116 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs index aef524249e8..b3ed69b244b 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs index 6f7f3456c3b..5f40614ad85 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeBgpPeer_CreateViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -561,24 +547,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs index ef4b7d95bc1..f03c10bc73e 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -605,24 +591,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs index 60431125073..8bbd560302d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs index 40e2f931c98..1df8759fb00 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs index bebd0f446a9..02c4a437efb 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeLoadBalancer_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs index bc53cc3c034..0b19b8c0c7d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -365,11 +356,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -685,24 +671,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs index c3f286f838c..6ededf10dfd 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -342,11 +333,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -679,24 +665,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs index 5d975da37f0..5974f2065de 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs index 4766f34cb3e..3050f5f9344 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzContainerOrchestratorRuntimeStorageClass_CreateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.N /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs index f4d5db9cee8..a5e1538fb24 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzContainerOrchestratorRuntimeStorageClass_Delete : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -239,11 +230,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.R /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs index d4beaef84e4..a689ece9463 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzContainerOrchestratorRuntimeStorageClass_DeleteViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.R /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs index 47c15ae074d..ecd48544962 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs index fb8940be6b4..d10702fcdf5 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs index 10567b863f7..d22c5e10e6e 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeBgpPeer_UpdateViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs index 3c5d51c81ea..95d96184a50 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -286,11 +277,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -606,24 +592,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs index d34c53287a1..2fa29fa694f 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs index 608b8a11a36..1a25b895bb0 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs index b1997d693f9..927a9a82fc8 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateExpande /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -366,11 +357,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -686,24 +672,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs index 646e60a85dc..1ee9ae19e6d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -244,11 +235,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs index c2198107cd8..60bd3bd6f31 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzContainerOrchestratorRuntimeStorageClass_UpdateViaJson /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.S /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs index cefceb43e0a..eb81f425392 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs index 0cdcb265974..53f958093d9 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeBgpPeer_UpdateViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.BgpPeer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -242,11 +233,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IBgpPeer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs index 22d66b6e158..54fc5794ef9 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs index ac62b564829..a5b986957a0 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzContainerOrchestratorRuntimeLoadBalancer_UpdateViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters) /// private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.LoadBalancer(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// IP Range [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "IP Range")] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.ILoadBalancer var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs index 04f86231b53..56bb236d0de 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The model for updating a storageClass private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResourceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -465,11 +456,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -786,24 +772,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs index ad5c20a3f4c..90519034510 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The model for updating a storageClass private Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResourceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.StorageClassResourceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce]")] @@ -442,11 +433,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -779,24 +765,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaIdentityExpande // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs index 2af6e5c23a7..20561342f5d 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -243,11 +234,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -564,24 +550,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs index 8dc74d4c43a..4eca4aca1b7 100644 --- a/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/KubernetesRuntime.Management/target/generated/cmdlets/UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.ParameterCategory.Runtime)] @@ -241,11 +232,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Cmdlets.U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ public UpdateAzContainerOrchestratorRuntimeStorageClass_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ContainerOrchestratorRuntime.Models.IStorageClassResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs index 403f87742e4..8f49a7e5eab 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzLambdaTestOrganization_CreateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -486,11 +477,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -832,24 +818,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs index 2abc21f1f7b..b727b618e30 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzLambdaTestOrganization_CreateViaIdentityExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -443,11 +434,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -810,24 +796,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs index bd252ac37d3..5f7f376f2a1 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzLambdaTestOrganization_CreateViaJsonFilePath : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs index 9ba9f613fa2..d8d245f70e1 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/NewAzLambdaTestOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzLambdaTestOrganization_CreateViaJsonString : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.NewAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs index 051bd8d50a8..c9c75255b84 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzLambdaTestOrganization_Delete : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.RemoveAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs index a7d1d98e33c..2b034780a86 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/RemoveAzLambdaTestOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzLambdaTestOrganization_DeleteViaIdentity : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.RemoveAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs index 2e28b0a56d8..f5aedc70faa 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzLambdaTestOrganization_UpdateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -833,24 +819,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs index 77532f47dd5..c63c583c118 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzLambdaTestOrganization_UpdateViaJsonFilePath : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs index 5ed261e2ce1..b4f77644fbc 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/SetAzLambdaTestOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzLambdaTestOrganization_UpdateViaJsonString : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.SetAzLambdaTestOrga /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs index 286a0e829b7..d98e7b82519 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzLambdaTestOrganization_UpdateExpanded : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -475,11 +466,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.UpdateAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -916,24 +902,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs index 8b61793ec23..0ecd0a58982 100644 --- a/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/LambdaTest.HyperExecute.Management/target/generated/cmdlets/UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzLambdaTestOrganization_UpdateViaIdentityExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Category(global::Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.ParameterCategory.Runtime)] @@ -434,11 +425,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Cmdlets.UpdateAzLambdaTestO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -898,24 +884,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.LambdaTest.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs index 773b1a9925e..074c18c20ca 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzWeightsBiasesInstance_CreateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -498,11 +489,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -844,24 +830,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs index 281bde226b5..a957d97fcb8 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzWeightsBiasesInstance_CreateViaIdentityExpanded : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -455,11 +446,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -822,24 +808,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs index 86bbf371412..4214858a734 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzWeightsBiasesInstance_CreateViaJsonFilePath : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs index ef00e5b3735..d63fd190c2c 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/NewAzWeightsBiasesInstance_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzWeightsBiasesInstance_CreateViaJsonString : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.NewAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs index 6e9e4b97f00..ca36411c2a5 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzWeightsBiasesInstance_Delete : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.RemoveAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs index b1afad18446..0902103dcc1 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/RemoveAzWeightsBiasesInstance_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzWeightsBiasesInstance_DeleteViaIdentity : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.RemoveAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs index 0219a9eddb9..f32442f202d 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzWeightsBiasesInstance_UpdateExpanded : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -499,11 +490,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -845,24 +831,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs index a2650140226..db3fd7dbb2f 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzWeightsBiasesInstance_UpdateViaJsonFilePath : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs index 900abbf4362..7147defa64e 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/SetAzWeightsBiasesInstance_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzWeightsBiasesInstance_UpdateViaJsonString : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.SetAzWeightsBias /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs index 6e4decfd60e..82d525d5129 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzWeightsBiasesInstance_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.UpdateAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -932,24 +918,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs index 73854872ca0..15a2a7e41ab 100644 --- a/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Liftr.WeightsAndBiases.Management/target/generated/cmdlets/UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzWeightsBiasesInstance_UpdateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.InstanceResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Category(global::Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.ParameterCategory.Runtime)] @@ -444,11 +435,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Cmdlets.UpdateAzWeightsB /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -912,24 +898,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.WeightsBiases.Models.IInstanceResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs index d596b42639e..5ee36744a3f 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzDevOpsInfrastructurePool_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -375,11 +366,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -721,24 +707,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs index 9eb2289a5ff..be9d50eada3 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -332,11 +323,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -699,24 +685,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs index 08e563858ed..eac879dfc9b 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs index e1e6625dd82..7e98d8fc471 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/NewAzDevOpsInfrastructurePool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzDevOpsInfrastructurePool_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.NewAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs index 2d5001acde3..52bf30f8649 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDevOpsInfrastructurePool_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.RemoveAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs index ea70a10853f..359ee10c74a 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzDevOpsInfrastructurePool_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.RemoveAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs index 721adc05df6..8dfa01a797e 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -376,11 +367,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -722,24 +708,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs index 18b9b693637..4a2c415a8fd 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs index d8576794b4d..1faee0cd2ba 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/SetAzDevOpsInfrastructurePool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzDevOpsInfrastructurePool_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.SetAzDevO /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs index fc1ee07e27a..f8b05a13026 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzDevOpsInfrastructurePool_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -364,11 +355,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.UpdateAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -765,24 +751,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs index 59937824bcf..a1930c005e2 100644 --- a/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Microsoft.DevOpsInfrastructure.Management/target/generated/cmdlets/UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzDevOpsInfrastructurePool_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.Pool(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Discriminator property for AgentProfile. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Discriminator property for AgentProfile.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.ParameterCategory.Body)] @@ -323,11 +314,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Cmdlets.UpdateAzD /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -747,24 +733,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevOpsInfrastructure.Models.IPool var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs index 60e2d7e85ee..6b42a99bb16 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNeonPostgresOrganization_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -549,11 +540,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -869,24 +855,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs index 34375bfd783..a0b14ad17cb 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNeonPostgresOrganization_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -506,11 +497,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -846,24 +832,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs index dc575747e23..8610aaec859 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNeonPostgresOrganization_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs index e0921114a25..4f4197f13e9 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/NewAzNeonPostgresOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNeonPostgresOrganization_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.NewAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs index 6e3e714e468..823c296035f 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNeonPostgresOrganization_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.RemoveAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs index 51c53ed3230..38f8e44aee0 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/RemoveAzNeonPostgresOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNeonPostgresOrganization_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.RemoveAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs index c8d161578fb..20e97802df6 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzNeonPostgresOrganization_UpdateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -550,11 +541,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -870,24 +856,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs index 42f4d8c2c4a..644336bdd82 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzNeonPostgresOrganization_UpdateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs index 181e0989554..cd00ea20950 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/SetAzNeonPostgresOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzNeonPostgresOrganization_UpdateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.SetAzNeonPostgres /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs index 3eb93429c19..417e5bca4dc 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -449,11 +440,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -769,24 +755,7 @@ public UpdateAzNeonPostgresOrganization_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs index 46befd89a9a..94ba3d08204 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Organization Resource by Neon private Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -408,11 +399,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -748,24 +734,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs index 83b5e8dbb49..2fdbb8098ed 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs index 4b6e13a1baf..62f22e9d469 100644 --- a/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Neon.Postgres.Management/target/generated/cmdlets/UpdateAzNeonPostgresOrganization_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzNeonPostgresOrganization_UpdateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Cmdlets.UpdateAzNeonPostg /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ public UpdateAzNeonPostgresOrganization_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NeonPostgres.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs index a6d550775e5..d93f9f868b1 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -503,11 +494,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -849,24 +835,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs index 4bb1e869d0d..eba2b22e47e 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -462,11 +453,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -829,24 +815,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs index 57f2c2e988e..bb7af9e4828 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs index b1c88bf36e3..c43f263805a 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataProduct_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNetworkAnalyticsDataProduct_CreateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs index ed3abd5c22b..d99069c2cb8 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateExpanded : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs index 782152d4494..07320b39f74 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaIdentityDataProductE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs index 6575de09fe3..90501169b9a 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaIdentityExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data type resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataType(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs index 8317480c704..959c19bff69 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaJsonFilePath : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs index 1576ac79b76..2172f6a8418 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/NewAzNetworkAnalyticsDataType_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzNetworkAnalyticsDataType_CreateViaJsonString : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.NewAzNetworkA /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs index 00b06c8b918..aa06982fc09 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataProduct_Delete : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs index 2929879e737..8d31f9f995f 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataProduct_DeleteViaIdentity : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs index 416a0f1668b..5aba4be70b3 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_Delete : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs index f82dc380ec2..35b115d7721 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs index 4236a96519a..db3a34782b9 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentity : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -231,11 +222,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs index 9c4b4150fe5..408ecbafe54 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProduct.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs index 5ac9a7943b1..1e3267ad811 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataProductExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityDataP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs index f3c972e75c7..31e3c50c84d 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaIdentityExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs index b227a982957..b94673e8397 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonFilePath /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs index bb44df51ce4..67eed5dce16 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString.cs @@ -39,15 +39,6 @@ public partial class RemoveAzNetworkAnalyticsDataTypeData_DeleteViaJsonString : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -290,11 +281,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs index ab462b6674a..c898b4f39c1 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_Delete : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs index 3c0e64dfd7a..eb6005bd1d8 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_DeleteViaIdentity : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs index 8b1297c6f66..136a844dbd5 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProduct.cs @@ -38,15 +38,6 @@ public partial class RemoveAzNetworkAnalyticsDataType_DeleteViaIdentityDataProdu /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.RemoveAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs index 81714274175..1db6446bcb6 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataProduct_UpdateExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -329,11 +320,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -718,24 +704,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs index d63c7fbe549..b509465a19c 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataProduct_UpdateViaIdentityExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The data product resource. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataProduct(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -288,11 +279,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -701,24 +687,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs index 2abe8ad8adf..3e852fb0f3f 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs index ba249dac49a..2ab0bd1054d 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProdu /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityDataProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs index 4e2537e2704..8b90f53ad59 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DataType. private Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataTypeUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.DataTypeUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs index 1f20b054a03..97f5979d085 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs index 86ded1b6729..022d795a1a8 100644 --- a/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/NetworkAnalytics.Management/target/generated/cmdlets/UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Cmdlets.UpdateAzNetwo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ public UpdateAzNetworkAnalyticsDataType_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.NetworkAnalytics.Models.IDataType var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs index 34118e17506..7bac165add6 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzPineconeOrganization_CreateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -486,11 +477,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -832,24 +818,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs index 4d877bc3692..9ae3ef19a55 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzPineconeOrganization_CreateViaIdentityExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -443,11 +434,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -810,24 +796,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs index 6c7984ef961..5ecc614d6b7 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzPineconeOrganization_CreateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs index 546de1cdbe2..280e5436b8c 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/NewAzPineconeOrganization_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzPineconeOrganization_CreateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.NewAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs index a1596eb5f65..ba5580b30dc 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzPineconeOrganization_Delete : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.RemoveAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs index bd060d2192d..facab71e8b5 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/RemoveAzPineconeOrganization_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzPineconeOrganization_DeleteViaIdentity : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.RemoveAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs index 509df61a4a5..b709c04e38c 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzPineconeOrganization_UpdateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -487,11 +478,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -833,24 +819,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs index 771684f901e..ac9c6c9547b 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzPineconeOrganization_UpdateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs index 0f5637879c6..2d39c3b052c 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/SetAzPineconeOrganization_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzPineconeOrganization_UpdateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.SetAzPineconeOrganiza /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs index c2e5d22dcf0..a53aac55f78 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzPineconeOrganization_UpdateExpanded : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -475,11 +466,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.UpdateAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -916,24 +902,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs index a26481c1e1d..cfac090eefb 100644 --- a/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Pinecone.VectorDb.Management/target/generated/cmdlets/UpdateAzPineconeOrganization_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzPineconeOrganization_UpdateViaIdentityExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.OrganizationResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Pinecone.ParameterCategory.Runtime)] @@ -432,11 +423,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Cmdlets.UpdateAzPineconeOrgan /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -896,24 +882,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Pinecone.Models.IOrganizationResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs index 17b63283063..76832b7f1f5 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzQumuloFileSystem_CreateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -418,11 +409,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -764,24 +750,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs index 20ab469ca88..f8582c51b3d 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class NewAzQumuloFileSystem_CreateViaIdentityExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -375,11 +366,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -742,24 +728,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs index a3be22e3791..db6b690a397 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzQumuloFileSystem_CreateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs index a77a81ea721..90d7e3b7feb 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/NewAzQumuloFileSystem_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzQumuloFileSystem_CreateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.NewAzQumuloFileSystem_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs index af1f9044e09..1f7d03e6284 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzQumuloFileSystem_Delete : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.RemoveAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs index 575bdc7e78e..fff9316a2c7 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/RemoveAzQumuloFileSystem_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzQumuloFileSystem_DeleteViaIdentity : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.RemoveAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs index b4960f0d68f..8b9c408c5f2 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateExpanded.cs @@ -39,20 +39,11 @@ public partial class SetAzQumuloFileSystem_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -419,11 +410,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -765,24 +751,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs index ab37dd741d9..35ffc3259c3 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzQumuloFileSystem_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs index eb533c566cf..8220f5f2d65 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/SetAzQumuloFileSystem_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzQumuloFileSystem_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.SetAzQumuloFileSystem_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs index 5d62f490e18..59a5ee55cd9 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzQumuloFileSystem_UpdateExpanded : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -407,11 +398,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.UpdateAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -824,24 +810,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs index e0a40fe6197..0dfa2b10a23 100644 --- a/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Qumulo.Storage.Management/target/generated/cmdlets/UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded.cs @@ -38,20 +38,11 @@ public partial class UpdateAzQumuloFileSystem_UpdateViaIdentityExpanded : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// /// Concrete tracked resource types can be created by aliasing this type using a specific property type. /// private Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.FileSystemResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Initial administrator password of the resource [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Initial administrator password of the resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Qumulo.ParameterCategory.Body)] @@ -364,11 +355,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Cmdlets.UpdateAzQumuloFileSyste /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -804,24 +790,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Qumulo.Models.IFileSystemResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs index ac779f09150..ea5254d3d9c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSphereCatalog_CreateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Azure Sphere catalog private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -271,11 +262,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -591,24 +577,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs index 906c9fb8f51..1e7eaff6b0d 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSphereCatalog_CreateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs index 161408b5615..204c65e9b7b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereCatalog_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSphereCatalog_CreateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereCatalog_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs index 5af7b51b466..acba6945083 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDeployment_CreateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An deployment resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -321,11 +312,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs index 715bbe49b20..5be518efffb 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeployment_CreateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -311,11 +302,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs index 0e858fa1f33..51d44030050 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeployment_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeployment_CreateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeployment_C /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs index be1ca148124..f8747b96cb7 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateExpanded : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs index ca6cd20875b..ba3991e2369 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalogExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityCatalog /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -268,11 +259,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -610,24 +596,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs index 5f116a2d021..307804d72eb 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceGroupExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityDeviceG /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -238,11 +229,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -588,24 +574,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs index 674ba52f2ca..5ba4cfa3080 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProductExpanded.cs @@ -44,15 +44,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaIdentityProduct /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -253,11 +244,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs index cd226043053..2d5e3a1a714 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonFilePath : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs index c93473285bf..7fa96e3228b 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceCapabilityImage_GenerateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeviceCapabilityImage_GenerateViaJsonString : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -306,11 +297,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceCapabi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -626,24 +612,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ISignedCapabilityImageResponse var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs index 857a1a0ef3d..33dff90a62a 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDeviceGroup_CreateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device group resource belonging to a product resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -660,24 +646,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs index 70d00584aad..f1a4502aa63 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDeviceGroup_CreateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs index 66e516f9a89..4eb6c6c3260 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDeviceGroup_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDeviceGroup_CreateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs index cce4b496c97..67995e1a55c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSphereDevice_CreateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs index 646021c2894..9de3243fea9 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSphereDevice_CreateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs index 0d7ab0cae30..f3ccab9443c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereDevice_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSphereDevice_CreateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereDevice_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs index e1f49c11879..abd6b1df157 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSphereImage_CreateExpanded : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An image resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -619,24 +605,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs index 88711281fc0..95bba4975ff 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSphereImage_CreateViaJsonFilePath : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs index 5a4a2157e34..4ca127bee92 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereImage_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSphereImage_CreateViaJsonString : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -274,11 +265,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereImage_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs index ceaa19a5db6..21a211525e8 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateExpanded.cs @@ -40,18 +40,9 @@ public partial class NewAzSphereProduct_CreateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An product resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs index ccbd7a2a5f2..7ba6d5196eb 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class NewAzSphereProduct_CreateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs index 88327cdf553..775bae338d5 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/NewAzSphereProduct_CreateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class NewAzSphereProduct_CreateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.NewAzSphereProduct_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs index 26469c5fdf4..ab4a4c9b686 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzSphereCatalog_Delete : global::System.Management.Au /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs index b9795508aa9..024c8e49870 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereCatalog_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzSphereCatalog_DeleteViaIdentity : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -216,11 +207,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereCatalog_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs index 9924a85f7d5..70a3a17c209 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_Delete : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs index a2447d491e1..f96dca7042c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentity : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs index 3118ad505c4..52932dc2d64 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityCatalog : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs index 7ae218c938e..f61c02f426a 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSphereDeviceGroup_DeleteViaIdentityProduct : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs index a44bb7b014c..6796a03a29e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_Delete.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_Delete : global::System.Management.Au /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs index edd32a11d22..e6630e8efb4 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentity.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_DeleteViaIdentity : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs index 7e2439e744e..f75dd51d12c 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/RemoveAzSphereProduct_DeleteViaIdentityCatalog.cs @@ -40,15 +40,6 @@ public partial class RemoveAzSphereProduct_DeleteViaIdentityCatalog : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.RemoveAzSphereProduct_D /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs index 5092c8958e9..cb86e5b75bf 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzSphereCatalog_UpdateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An Azure Sphere catalog private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Catalog(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -272,11 +263,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs index 2f948fc5ac4..b46ac2159fa 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzSphereCatalog_UpdateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs index e3a715f0a3d..179b804e04f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereCatalog_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzSphereCatalog_UpdateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -260,11 +251,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereCatalog_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ICatalog var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs index d4160079ee3..962650be839 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDeployment_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An deployment resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Deployment(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -322,11 +313,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -642,24 +628,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs index 3eaf13ad595..0b79274ef2f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDeployment_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -312,11 +303,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -632,24 +618,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs index a83b4c4cba4..a37b67b4a00 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeployment_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDeployment_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeployment_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeployment var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs index 4b2b89520e8..b441580f885 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDeviceGroup_UpdateExpanded : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device group resource belonging to a product resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroup(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -341,11 +332,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -661,24 +647,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs index ba0e39d2430..f1096f4f4cc 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDeviceGroup_UpdateViaJsonFilePath : global::Syst /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -295,11 +286,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs index 78a95800af9..5d75a6a8d14 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDeviceGroup_UpdateViaJsonString : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -293,11 +284,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDeviceGroup_ /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs index e935b16d4ee..8b759d2087d 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateExpanded.cs @@ -42,18 +42,9 @@ public partial class SetAzSphereDevice_UpdateExpanded : global::System.Managemen /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An device resource belonging to a device group resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Device(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs index e3f5555227d..0c3dfed71f0 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonFilePath.cs @@ -43,17 +43,8 @@ public partial class SetAzSphereDevice_UpdateViaJsonFilePath : global::System.Ma /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -311,11 +302,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -631,24 +617,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs index ac95ca5a59f..6f4e8517aa4 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereDevice_UpdateViaJsonString.cs @@ -43,15 +43,6 @@ public partial class SetAzSphereDevice_UpdateViaJsonString : global::System.Mana /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -309,11 +300,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereDevice_Updat /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -629,24 +615,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs index 788c8ce6edc..1ac6375de9f 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzSphereImage_UpdateExpanded : global::System.Management /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An image resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Image(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -300,11 +291,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -620,24 +606,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs index 93bd1f34e1f..55e346957be 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzSphereImage_UpdateViaJsonFilePath : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs index 2e45b61e7f9..d44e5bbe347 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereImage_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzSphereImage_UpdateViaJsonString : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereImage_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IImage var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs index f406cb1f813..f4c379c3729 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class SetAzSphereProduct_UpdateExpanded : global::System.Manageme /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// An product resource belonging to a catalog resource. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.Product(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs index 828059b077d..bbdd558abe8 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class SetAzSphereProduct_UpdateViaJsonFilePath : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs index d6fc720c985..49758ed5f21 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/SetAzSphereProduct_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class SetAzSphereProduct_UpdateViaJsonString : global::System.Man /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.SetAzSphereProduct_Upda /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -597,24 +583,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs index 4a537ada8a9..63eaecd6cdf 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateExpanded : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -340,11 +331,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -660,24 +646,7 @@ public UpdateAzSphereDeviceGroup_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs index 05d305f11ec..67c824b5fa0 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -300,11 +291,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -641,24 +627,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs index 4935accac9f..315b6a1c46a 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -267,11 +258,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs index d07e8265159..7904bf42912 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the DeviceGroup. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceGroupUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Flag to define if the user allows for crash dump collection. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to define if the user allows for crash dump collection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Body)] @@ -285,11 +276,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaIdentityProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs index 248773cad39..a23387add01 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs index fd274365d97..e57e94bbcea 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDeviceGroup_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzSphereDeviceGroup_UpdateViaJsonString : global::Sys /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDeviceGro /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ public UpdateAzSphereDeviceGroup_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceGroup var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs index a327d369ba4..c5e3d3612b4 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateExpanded : global::System.Manage /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzSphereDevice_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs index f89029421ca..b8b52dc2037 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -266,11 +257,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,24 +593,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs index 8cd2564bf39..54c2060a7e9 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityDeviceGroupExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs index 680887450ee..a1b8fc53a74 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityExpanded : global::Sy /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -219,11 +210,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -571,24 +557,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs index f51354e12c1..d0c993462a6 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaIdentityProductExpanded.cs @@ -41,18 +41,9 @@ public partial class UpdateAzSphereDevice_UpdateViaIdentityProductExpanded : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Device. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDeviceUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.DeviceUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -251,11 +242,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereDevice_UpdateViaIdentityProductExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs index 3123dd3b600..d35e30498b5 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class UpdateAzSphereDevice_UpdateViaJsonFilePath : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -310,11 +301,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -630,24 +616,7 @@ public UpdateAzSphereDevice_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs index 372e657542d..1043efb032d 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereDevice_UpdateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class UpdateAzSphereDevice_UpdateViaJsonString : global::System.M /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -308,11 +299,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereDevice_Up /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -628,24 +614,7 @@ public UpdateAzSphereDevice_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IDevice var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs index 70e3435da35..4842a4c1493 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateExpanded : global::System.Manag /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereProduct_UpdateExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs index 0743c993984..b55dfae2016 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded : gl /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -234,11 +225,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ public UpdateAzSphereProduct_UpdateViaIdentityCatalogExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs index a81aa6cd069..ea44e0b528e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaIdentityExpanded.cs @@ -40,18 +40,9 @@ public partial class UpdateAzSphereProduct_UpdateViaIdentityExpanded : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// The type used for update operations of the Product. private Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProductUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.ProductUpdate(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ public UpdateAzSphereProduct_UpdateViaIdentityExpanded() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs index 563aa29539a..7d6932b202e 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class UpdateAzSphereProduct_UpdateViaJsonFilePath : global::Syste /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ public UpdateAzSphereProduct_UpdateViaJsonFilePath() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs index 03b0e15e4c0..d61cea24f56 100644 --- a/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Sphere.Management/target/generated/cmdlets/UpdateAzSphereProduct_UpdateViaJsonString.cs @@ -41,15 +41,6 @@ public partial class UpdateAzSphereProduct_UpdateViaJsonString : global::System. /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Sphere.ParameterCategory.Runtime)] @@ -276,11 +267,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Sphere.Cmdlets.UpdateAzSphereProduct_U /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Sphere.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ public UpdateAzSphereProduct_UpdateViaJsonString() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Sphere.Models.IProduct var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs index 51e78aa0383..cc0f1f89380 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -342,11 +333,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -662,24 +648,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs index 791dfa88457..fe84fcd9e08 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -299,11 +290,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -640,24 +626,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs index 9182aa52e65..339513107a1 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs index 64a6858f953..de372c8ccf9 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzStandbyPoolStandbyContainerGroupPool_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs index 0f7b146e218..e680ee01ad8 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -325,11 +316,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -645,24 +631,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs index d3966add056..0f0d6c044e3 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -623,24 +609,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs index ba2632e053b..2eee9af6778 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs index 7b8b8901f5c..9cd96c45859 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzStandbyPoolStandbyVirtualMachinePool_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.NewAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs index bcba0d46416..80fdbbf97da 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyContainerGroupPool_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs index 6e433cdbe1b..03589dff20a 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyContainerGroupPool_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs index f217ddcaa26..19c9b0e83d1 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyVirtualMachinePool_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -259,11 +250,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs index 2562bb75192..85e157ba40a 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdentity.cs @@ -38,15 +38,6 @@ public partial class RemoveAzStandbyPoolStandbyVirtualMachinePool_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.RemoveAzStandbyPoo /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs index 9f24926fa28..1043d198af3 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyContainerGroupPoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -343,11 +334,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -663,24 +649,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs index 8e8c24fed9c..354640b4a3c 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs index b918c852bb9..7ec899ffe05 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzStandbyPoolStandbyContainerGroupPool_UpdateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs index acd8c556c40..c93ea08b2be 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded.cs @@ -39,18 +39,9 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// A StandbyVirtualMachinePoolResource. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResource(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -326,11 +317,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -646,24 +632,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs index 2cb95e7f6d0..f8c308b6bd6 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFilePath.cs @@ -40,17 +40,8 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -264,11 +255,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs index 15f14be2894..2ee9ba9c63f 100644 --- a/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/StandbyPool.Management/target/generated/cmdlets/SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonString.cs @@ -40,15 +40,6 @@ public partial class SetAzStandbyPoolStandbyVirtualMachinePool_UpdateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets.SetAzStandbyPoolSt /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs index 3b2efea1279..b1f104856f9 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -290,11 +281,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -611,24 +597,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs index 2e489cd95ba..6717cadf408 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index c4525973453..f8816acd6b4 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Application Server Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapApplicationServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -248,11 +239,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -590,24 +576,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs index 7f5c22c1b99..b73c88aa3cf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs index 2a7ce1e357f..9536d626db1 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapApplicationServerInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapApplicationServerInstance_CreateV /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapApplicationServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs index fbc06412049..74585f2df0d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateExpan /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs index fffd4aef092..69d04cb00c5 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaId /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index 58c14ff13c8..282bec2f8f4 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaId /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the SAP Central Services Instance resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapCentralServerInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs index b56d27931a2..085e17895cd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJs /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs index a4ecaca3a2a..fe3663969fd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapCentralServerInstance_CreateViaJs /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapCentralServerInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs index 20cde6b9270..295d00159e1 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -612,24 +598,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs index 017841b6688..78cbd10c04e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentityExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs index 50911b3b71a..7c130fec1dd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentitySapVirtualInstanceExpanded.cs @@ -41,18 +41,9 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Database resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapDatabaseInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs index 5e65ff313b4..397a387e473 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFilePath.cs @@ -42,17 +42,8 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonFil /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -282,11 +273,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -603,24 +589,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs index 67e106168df..ac7befe1cfd 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonString.cs @@ -42,15 +42,6 @@ public partial class NewAzSapVirtualInstanceSapDatabaseInstance_CreateViaJsonStr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -280,11 +271,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -601,24 +587,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapDatabaseInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs index 473f0203996..f718b6810af 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -350,11 +341,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -696,24 +682,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs index 61b508d1685..7df303c1e9a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -307,11 +298,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -675,24 +661,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs index 0e9d6488ded..608801a23b2 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs index e2d1f671294..2d934ad6dc8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonString.cs @@ -39,15 +39,6 @@ public partial class NewAzSapVirtualInstanceSapVirtualInstance_CreateViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.NewAzSapVir /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -582,24 +568,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs index aa46fde91af..dfe285e1ad1 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs index d7163225c18..32d354815e7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs index 4e208f80023..a2469a4de8a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapApplicationServerInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapApplicationServerInstance_Dele /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -236,11 +227,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs index 4f78608b751..4fe1001f21d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_Delete : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -281,11 +272,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs index 355e442de10..01c21590b25 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentity.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs index 98f0d12c00f..17a5c5a0ad5 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -42,15 +42,6 @@ public partial class RemoveAzSapVirtualInstanceSapCentralServerInstance_DeleteVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -239,11 +230,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs index 21b09fca802..2c13aa06275 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_Delete : glob /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs index fa37bc63481..d69c53138a3 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs index d69845b918c..6f2092a7fd6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIdentitySapVirtualInstance.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapDatabaseInstance_DeleteViaIden /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -238,11 +229,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs index ec3e638751a..7dd68c22a6e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_Delete.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapVirtualInstance_Delete : globa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -262,11 +253,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs index 0bdc7231bcd..0e22b455595 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdentity.cs @@ -41,15 +41,6 @@ public partial class RemoveAzSapVirtualInstanceSapVirtualInstance_DeleteViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -221,11 +212,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.RemoveAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs index f8055d790a7..f166f5db8ad 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs index 428221db84f..fcc220ff697 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs index 9bf4af36027..443f192ac6c 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs index 94a6a16de33..a360a68111a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs index f7c11b7ecf2..d475bc41ddf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index 56fbdea0b89..52b57fa3977 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs index 0aded79a15c..563a0f07232 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs index 155823f09bd..56c619edb15 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapApplicationServerInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapApplicationServerInstance_Start /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs index a04abff0bf3..7b4181267b7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_Start : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs index 31c4ff12e6e..c0629135591 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartExpa /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs index 93421484826..1148c7d004b 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs index ffa825434e6..627322697d8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs index 02a1091b15a..a73044fc5c8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index f501b5bb486..650268ab04f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaI /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs index 1da3c0f40bf..25548e1dc27 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs index 03c8ba1925e..6e8fba428fc 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapCentralServerInstance_StartViaJ /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs index 6af98f42ac0..80de65c5dab 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_Start.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_Start : global /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs index 7474c57771c..244f80080eb 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -599,24 +585,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs index b9479db6201..8f0e7611fd7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs index ca376dded6b..2244b0ffc09 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -565,24 +551,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs index 53de4c6ad89..20c3e3a9b1e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs index 787cc5760ba..c47eed8c447 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaIdenti /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -579,24 +565,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs index 93c28d1021f..2e573ffa0a3 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonFi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs index 9f56623d010..d2ede54adc7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StartAzSapVirtualInstanceSapDatabaseInstance_StartViaJsonSt /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs index 3c2908ce125..64c0b9f3e24 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_Start.cs @@ -40,15 +40,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_Start : global: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs index 1c22f46db40..b29215500b0 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded.cs @@ -43,15 +43,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -585,24 +571,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs index 6c812405f98..64b8f1fbf6f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentity.cs @@ -40,15 +40,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -560,24 +546,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs index 2d85e2c426b..3fda5daeadb 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaIdentit /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -222,11 +213,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs index 295acccebc4..d0c09cd2743 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonFil /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs index 39e2118106e..ef64f1a767d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonString.cs @@ -41,15 +41,6 @@ public partial class StartAzSapVirtualInstanceSapVirtualInstance_StartViaJsonStr /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StartAzSapV /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -584,24 +570,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs index a30ce12bdb4..169c14c1fd6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_Stop : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs index 0843e294460..7af8bba208a 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopEx /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -292,11 +283,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -613,24 +599,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs index 52ac2108b97..56e9089dbe6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs index fea8fd6ce98..5580b3daeb0 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs index acd06e09eb6..2d66aa3b5ba 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -233,11 +224,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -575,24 +561,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index 52fbc616264..8b26f74e912 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -250,11 +241,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -592,24 +578,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs index 020fe9459b1..67a91252ce4 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs index 5f0626ec28e..3c29759d2be 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapApplicationServerInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapApplicationServerInstance_StopVi /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// Backing field for property. private string _applicationInstanceName; @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -596,24 +582,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs index 7e0e34af8ea..947dad637ed 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_Stop : glo /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs index 79ae8d71a53..fefb14b4087 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopExpand /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -615,24 +601,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs index 903eb38c08f..005fa370725 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -563,24 +549,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs index 315f4043284..0f5a2bde7ae 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs index b7ff3b90b54..7fa2301c262 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index 26a1bdd62e4..a57e4f74ef8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaIde /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs index e42a5350118..bb65488d279 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs index 0a6b00df0d8..6b4b54f9cc6 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapCentralServerInstance_StopViaJso /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs index 542c4b7884f..ee27d91ef7e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_Stop.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_Stop : global:: /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -275,11 +266,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -595,24 +581,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs index 9a531fdd8c0..727ab937974 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopExpanded : /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -294,11 +285,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -614,24 +600,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs index 0b7f8880c00..60487bef9bf 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -218,11 +209,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -562,24 +548,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs index 26cc06b4894..cd1b205867d 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentityExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -580,24 +566,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs index 8201adb47ed..4775c737487 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstance.cs @@ -38,15 +38,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -235,11 +226,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -577,24 +563,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs index c3d0430cb2a..808a1ab3588 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentitySapVirtualInstanceExpanded.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -252,11 +243,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -594,24 +580,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs index 6ebb9605985..e7dfc3192cb 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFilePath.cs @@ -39,17 +39,8 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonFile /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -279,11 +270,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -600,24 +586,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs index 163373d4007..b841dc1c1ae 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonString.cs @@ -39,15 +39,6 @@ public partial class StopAzSapVirtualInstanceSapDatabaseInstance_StopViaJsonStri /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -277,11 +268,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs index a266a4cbf77..c589a1b675e 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_Stop.cs @@ -40,15 +40,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_Stop : global::S /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -261,11 +252,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -581,24 +567,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs index 8cb1b55fa3b..05faa8eabf7 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded.cs @@ -43,15 +43,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopExpanded : g /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -278,11 +269,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -598,24 +584,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs index 4b8b05ccb36..4d658bdc0ea 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity.cs @@ -40,15 +40,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentity /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -220,11 +211,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -560,24 +546,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs index 3ecd9e850e9..bbc0945acf8 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityExpanded.cs @@ -43,15 +43,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaIdentityE /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -237,11 +228,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -578,24 +564,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs index f114e2e1c22..6d4db0b65ac 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFilePath.cs @@ -41,17 +41,8 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonFileP /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - public global::System.String _jsonString; - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -265,11 +256,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -586,24 +572,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs index cd6c5f56fa2..90253d72a67 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonString.cs @@ -41,15 +41,6 @@ public partial class StopAzSapVirtualInstanceSapVirtualInstance_StopViaJsonStrin /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -263,11 +254,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.StopAzSapVi /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -583,24 +569,7 @@ protected override void StopProcessing() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.IOperationStatusResult var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs index 463f0a0b8f3..c0aa31b868f 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateExpanded /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -315,11 +306,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.UpdateAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -696,24 +682,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } } diff --git a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs index cae68cd678e..93d4b5195d0 100644 --- a/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs +++ b/tests-upgrade/tests-emitter/Workloads.SAPVirtualInstance.Management/target/generated/cmdlets/UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdentityExpanded.cs @@ -38,18 +38,9 @@ public partial class UpdateAzSapVirtualInstanceSapVirtualInstance_UpdateViaIdent /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// A buffer to record first returned object in response. - private object _firstResponse = null; - /// Define the Virtual Instance for SAP solutions resource. private Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.SapVirtualInstance(); - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.ParameterCategory.Runtime)] @@ -272,11 +263,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Cmdlets.UpdateAzSap /// Performs clean-up after the command execution protected override void EndProcessing() { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -677,24 +663,7 @@ private void Update_resourceBody() // onOk - response for 200 / application/json // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SAPVirtualInstance.Models.ISapVirtualInstance var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } + WriteObject(result, false); } } }