// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #nullable disable 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 { /// /// A fake server discovery class /// [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> GetServerInstancesAsync() { throw new NotImplementedException(); } public IAccountManager AccountManager { get; set; } /// /// This should always return null otherwise there's going to be a infinite loop /// public IServerDiscoveryProvider ServerDiscoveryProvider { get { return GetService(); } } } }