Files
sqltoolsservice/test/Microsoft.SqlTools.ServiceLayer.UnitTests/ResourceProvider/Azure/FakeAzureServerDiscoveryProvider.cs
Charles Gagnon c248400a6c Add linting for copyright and unused usings (#1416)
* Add linting for copyright and unused usings

* Add one more + comment

* Enforce in build and fix errors

* Fix build
2022-03-04 15:17:29 -08:00

50 lines
1.7 KiB
C#

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Threading.Tasks;
using Microsoft.SqlTools.ResourceProvider.Core;
using Microsoft.SqlTools.ResourceProvider.Core.Authentication;
using Microsoft.SqlTools.ResourceProvider.Core.Extensibility;
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ResourceProvider.Azure
{
/// <summary>
/// A fake server discovery class
/// </summary>
[Exportable(ServerTypes.SqlServer, Categories.Azure
, typeof(IServerDiscoveryProvider),
"Microsoft.SqlTools.ServiceLayer.UnitTests.ResourceProvider.Azure.FakeAzureServerDiscoveryProvider", 1)]
public class FakeAzureServerDiscoveryProvider : ExportableBase, IServerDiscoveryProvider, ISecureService
{
public FakeAzureServerDiscoveryProvider()
{
Metadata = new ExportableMetadata(ServerTypes.SqlServer, Categories.Azure,
"Microsoft.SqlTools.ServiceLayer.UnitTests.ResourceProvider.Azure.FakeAzureServerDiscoveryProvider", 1);
}
public Task<ServiceResponse<ServerInstanceInfo>> GetServerInstancesAsync()
{
throw new NotImplementedException();
}
public IAccountManager AccountManager
{
get;
set;
}
/// <summary>
/// This should always return null otherwise there's going to be a infinite loop
/// </summary>
public IServerDiscoveryProvider ServerDiscoveryProvider
{
get
{
return GetService<IServerDiscoveryProvider>();
}
}
}
}