32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
using Nop.Core.Domain.Customers;
|
|
using Nop.Core.Domain.Directory;
|
|
using Nop.Services.Directory;
|
|
using Nop.Services.Plugins;
|
|
|
|
namespace Mango.Sandbox.EndPoints.Services;
|
|
|
|
/// <summary>
|
|
/// Null implementation of IExchangeRatePluginManager for SANDBOX
|
|
/// </summary>
|
|
public class NullExchangeRatePluginManager : IExchangeRatePluginManager
|
|
{
|
|
public Task<IExchangeRateProvider?> LoadPrimaryPluginAsync(Customer? customer = null, int storeId = 0)
|
|
=> Task.FromResult<IExchangeRateProvider?>(null);
|
|
|
|
public bool IsPluginActive(IExchangeRateProvider exchangeRateProvider) => false;
|
|
|
|
public Task<IExchangeRateProvider?> LoadPluginBySystemNameAsync(string systemName, Customer? customer = null, int storeId = 0)
|
|
=> Task.FromResult<IExchangeRateProvider?>(null);
|
|
|
|
public Task<IList<IExchangeRateProvider>> LoadAllPluginsAsync(Customer? customer = null, int storeId = 0)
|
|
=> Task.FromResult<IList<IExchangeRateProvider>>(new List<IExchangeRateProvider>());
|
|
|
|
public bool IsPluginActive(IExchangeRateProvider plugin, List<string> systemNames) => false;
|
|
|
|
public Task<IList<IExchangeRateProvider>> LoadActivePluginsAsync(List<string> systemNames, Customer? customer = null, int storeId = 0)
|
|
=> Task.FromResult<IList<IExchangeRateProvider>>(new List<IExchangeRateProvider>());
|
|
|
|
public Task<string> GetPluginLogoUrlAsync(IExchangeRateProvider plugin)
|
|
=> Task.FromResult(string.Empty);
|
|
}
|