mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
901 B
26 lines
901 B
using System.Threading.Tasks;
|
|
using Microsoft.Extensions.Options;
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
namespace Volo.Abp.Http.Client
|
|
{
|
|
public class RemoteServiceConfigurationProvider : IRemoteServiceConfigurationProvider, IScopedDependency
|
|
{
|
|
protected AbpRemoteServiceOptions Options { get; }
|
|
|
|
public RemoteServiceConfigurationProvider(IOptionsSnapshot<AbpRemoteServiceOptions> options)
|
|
{
|
|
Options = options.Value;
|
|
}
|
|
|
|
public Task<RemoteServiceConfiguration> GetConfigurationOrDefaultAsync(string name)
|
|
{
|
|
return Task.FromResult(Options.RemoteServices.GetConfigurationOrDefault(name));
|
|
}
|
|
|
|
public Task<RemoteServiceConfiguration> GetConfigurationOrDefaultOrNullAsync(string name)
|
|
{
|
|
return Task.FromResult(Options.RemoteServices.GetConfigurationOrDefaultOrNull(name));
|
|
}
|
|
}
|
|
}
|