Skip to content

Commit 3b8d521

Browse files
author
Hovsep
committed
Merge pull request #2135 from markcowl/vsuseragent
Returning support for legacy method to add user agents (used in VS Integration)
2 parents c841ea3 + dfe6cef commit 3b8d521

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/Common/Commands.Common.Authentication/Commands.Common.Authentication.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
<Compile Include="Interfaces\IClientFactory.cs" />
150150
<Compile Include="Interfaces\IDataStore.cs" />
151151
<Compile Include="Interfaces\IProfileSerializer.cs" />
152+
<Compile Include="LegacySupport.cs" />
152153
<Compile Include="Models\AzureAccount.cs" />
153154
<Compile Include="Models\AzureAccount.Methods.cs" />
154155
<Compile Include="Models\AzureContext.cs" />
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.Common.Authentication;
16+
17+
namespace Microsoft.Azure.Common.Authentication
18+
{
19+
/// <summary>
20+
/// Provide backward compatibility for setting User Agent values
21+
/// </summary>
22+
public static class AzureSession
23+
{
24+
/// <summary>
25+
/// The ClientFactory used to produce management clients in this session
26+
/// </summary>
27+
public static IClientFactory ClientFactory
28+
{
29+
get { return Commands.Common.Authentication.AzureSession.ClientFactory; }
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)