Skip to content

Commit f06c511

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
Merging
2 parents c8b109f + 5a9e883 commit f06c511

18 files changed

+38
-21
lines changed

src/ResourceManager/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,14 @@
274274
<Compile Include="Generated\TenantOperations.cs" />
275275
<Compile Include="Generated\TenantOperationsExtensions.cs" />
276276
<Compile Include="GlobalSuppressions.cs" />
277+
<Compile Include="PaginatedResponseHelper.cs" />
277278
<Compile Include="Properties\AssemblyInfo.cs" />
278279
<Compile Include="Properties\Resources.Designer.cs">
279280
<AutoGen>True</AutoGen>
280281
<DesignTime>True</DesignTime>
281282
<DependentUpon>Resources.resx</DependentUpon>
282283
</Compile>
284+
<Compile Include="ResponseWithContinuation.cs" />
283285
<Compile Include="RPRegistrationDelegatingHandler.cs" />
284286
<Compile Include="ServiceClientTracingInterceptor.cs" />
285287
<Compile Include="Tags\PSTag.cs" />
@@ -309,4 +311,4 @@
309311
</ProjectReference>
310312
</ItemGroup>
311313
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
312-
</Project>
314+
</Project>
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components
15+
namespace Microsoft.Azure.Commands.ResourceManager.Common
1616
{
17-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
1817
using System;
1918
using System.Collections.Generic;
19+
using System.Linq;
2020
using System.Threading;
2121
using System.Threading.Tasks;
2222

@@ -85,10 +85,20 @@ public static TType[] Enumerate<TType>(
8585
return result.ToArray();
8686
}
8787

88-
result.AddRange(batch.Value.CoalesceEnumerable());
88+
result.AddRange(batch.Value.Coalesce());
8989
}
9090

9191
return result.ToArray();
9292
}
93+
94+
/// <summary>
95+
/// Coalesces the enumerable.
96+
/// </summary>
97+
/// <typeparam name="TSource">The type of the source.</typeparam>
98+
/// <param name="source">The source.</param>
99+
public static IEnumerable<TSource> Coalesce<TSource>(this IEnumerable<TSource> source)
100+
{
101+
return source ?? Enumerable.Empty<TSource>();
102+
}
93103
}
94104
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components
15+
namespace Microsoft.Azure.Commands.ResourceManager.Common
1616
{
1717
using Newtonsoft.Json;
1818
using System.Collections;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Commands.Resources.Rest.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,9 @@
100100
<Compile Include="Components\HttpMethodExt.cs" />
101101
<Compile Include="Components\HttpStatusCodeExt.cs" />
102102
<Compile Include="Components\OperationResult.cs" />
103-
<Compile Include="Components\PaginatedResponseHelper.cs" />
104103
<Compile Include="Components\QueryFilterBuilder.cs" />
105104
<Compile Include="Components\ResourceIdUtility.cs" />
106105
<Compile Include="Components\ResourceManagerClientHelper.cs" />
107-
<Compile Include="Components\ResponseWithContinuation.cs" />
108106
<Compile Include="Components\TagsHelper.cs" />
109107
<Compile Include="Entities\Authorization\Permission.cs" />
110108
<Compile Include="Entities\ErrorResponses\ErrorResponseMessage.cs" />
@@ -283,4 +281,4 @@
283281
</ItemGroup>
284282
<ItemGroup />
285283
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
286-
</Project>
284+
</Project>

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/ApiVersionHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components
1818
{
1919
using Entities.Providers;
2020
using Extensions;
21+
using Microsoft.Azure.Commands.ResourceManager.Common;
2122
using System;
2223
using System.Collections.Generic;
2324
using System.Globalization;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/CmdletBase/ResourceManagerCmdletBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2323
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
2424
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2525
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients;
26+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient;
2627
using Newtonsoft.Json.Linq;
2728
using System;
2829
using System.Collections.Generic;
29-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkClient;
30-
using System.Threading;
3130
using System.Linq;
3231
using System.Management.Automation;
3332
using System.Runtime.ExceptionServices;
33+
using System.Threading;
3434
using System.Threading.Tasks;
3535

3636
/// <summary>

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Locations/GetAzureLocationCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
2626
/// <summary>
2727
/// Get all locations with the supported providers.
2828
/// </summary>
29-
[Cmdlet(VerbsCommon.Get, "AzureRmLocation"), OutputType(typeof(List<PSResourceProviderLocation>))]
29+
[Cmdlet(VerbsCommon.Get, "AzureRmLocation"), OutputType(typeof(List<PSResourceProviderLocation>))]
3030
public class GetAzureLocationCmdlet: ResourceManagerCmdletBase
3131
{
3232
/// <summary>

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Lock/GetAzureResourceLockCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1817
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
1919
using Newtonsoft.Json.Linq;
2020
using System.Management.Automation;
2121
using System.Threading.Tasks;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyAssignment.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
19+
using Microsoft.Azure.Commands.ResourceManager.Common;
1920
using Newtonsoft.Json.Linq;
2021
using System.Management.Automation;
2122
using System.Threading.Tasks;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/GetAzurePolicyDefinition.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
19+
using Microsoft.Azure.Commands.ResourceManager.Common;
1920
using Newtonsoft.Json.Linq;
2021
using System.Management.Automation;
2122
using System.Threading.Tasks;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyAssignmentCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1817
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
1919
using Newtonsoft.Json.Linq;
2020
using System.Linq;
2121
using System.Management.Automation;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Policy/PolicyDefinitionCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1817
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
1919
using Newtonsoft.Json.Linq;
2020
using System.Linq;
2121
using System.Management.Automation;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Providers/GetAzureProviderCmdlet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17-
using System;
18-
using System.Linq;
19-
using System.Management.Automation;
2017
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
2118
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkExtensions;
2219
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels;
20+
using System;
21+
using System.Linq;
22+
using System.Management.Automation;
2323
using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources;
2424

2525
/// <summary>

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/FindAzureResourceCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2021
using Newtonsoft.Json.Linq;
2122
using System;
2223
using System.Collections.Concurrent;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/Resource/GetAzureResourceCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2021
using Newtonsoft.Json.Linq;
2122
using System;
2223
using System.Collections.Concurrent;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceGroupDeployments/GetAzureResourceGroupDeploymentOperationCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
19+
using Microsoft.Azure.Commands.ResourceManager.Common;
1920
using Newtonsoft.Json.Linq;
2021
using System;
2122
using System.Management.Automation;

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Implementation/ResourceGroups/FindAzureResourceGroupCmdlet.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
1616
{
17+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
18+
using Microsoft.Azure.Commands.ResourceManager.Common;
19+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
20+
using Newtonsoft.Json.Linq;
1721
using System;
1822
using System.Collections;
1923
using System.Management.Automation;
2024
using System.Threading.Tasks;
21-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
22-
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
23-
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
24-
using Newtonsoft.Json.Linq;
2525
using ProjectResources = Microsoft.Azure.Commands.ResourceManager.Cmdlets.Properties.Resources;
2626

2727
/// <summary>

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/RestClients/ResourceManagerRestRestClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Operations;
1919
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
20+
using Microsoft.Azure.Commands.ResourceManager.Common;
2021
using Newtonsoft.Json.Linq;
2122
using System;
2223
using System.Linq;

0 commit comments

Comments
 (0)