Skip to content

Commit 64f6321

Browse files
committed
Changed to use the Context from Azure Authentication
1 parent 782014a commit 64f6321

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
<SpecificVersion>False</SpecificVersion>
5454
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5555
</Reference>
56+
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57+
<SpecificVersion>False</SpecificVersion>
58+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.10-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
59+
</Reference>
5660
<Reference Include="Microsoft.Azure.Common.Extensions">
5761
<SpecificVersion>False</SpecificVersion>
5862
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Extensions.0.13.1-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Common/RdsCmdlet.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Hyak.Common;
16-
using Microsoft.Azure.Common.Extensions;
17-
using Microsoft.Azure.Common.Extensions.Models;
16+
using Microsoft.Azure.Common.Authentication;
17+
using Microsoft.Azure.Common.Authentication.Models;
1818
using Microsoft.Azure.Management.RemoteApp.Models;
1919
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2020
using System;
@@ -54,7 +54,7 @@ public IRemoteAppManagementClient Client
5454
{
5555
if (client == null)
5656
{
57-
client = AzureSession.ClientFactory.CreateClient<RemoteAppManagementClient>(AzureSession.CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement);
57+
client = AzureSession.ClientFactory.CreateClient<RemoteAppManagementClient>(Profile.Context, AzureEnvironment.Endpoint.ServiceManagement);
5858
client.RdfeNamespace = "remoteapp";
5959

6060
// Read the namespace if defined as an environment variable from the session configuration
@@ -206,7 +206,7 @@ protected void RegisterSubscriptionWithRdfeForRemoteApp()
206206

207207
// register the subscription with RDFE to use the RemoteApp resource
208208
Microsoft.WindowsAzure.Management.ManagementClient mgmtClient =
209-
AzureSession.ClientFactory.CreateClient<Microsoft.WindowsAzure.Management.ManagementClient>(AzureSession.CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement);
209+
AzureSession.ClientFactory.CreateClient<Microsoft.WindowsAzure.Management.ManagementClient>(Profile.Context, AzureEnvironment.Endpoint.ServiceManagement);
210210

211211
try
212212
{

src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.0.10-preview" targetFramework="net45" />
56
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
67
<package id="Microsoft.Azure.Common.Extensions" version="0.13.1-preview" targetFramework="net45" />
78
<package id="Microsoft.Azure.Management.RemoteApp" version="1.0.5-preview" targetFramework="net45" />

0 commit comments

Comments
 (0)