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.
28 lines
788 B
28 lines
788 B
using System;
|
|
using System.Threading.Tasks;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Volo.Abp.MultiTenancy
|
|
{
|
|
public class ActionTenantResolveContributor : TenantResolveContributorBase
|
|
{
|
|
public const string ContributorName = "Action";
|
|
|
|
public override string Name => ContributorName;
|
|
|
|
private readonly Action<ITenantResolveContext> _resolveAction;
|
|
|
|
public ActionTenantResolveContributor([NotNull] Action<ITenantResolveContext> resolveAction)
|
|
{
|
|
Check.NotNull(resolveAction, nameof(resolveAction));
|
|
|
|
_resolveAction = resolveAction;
|
|
}
|
|
|
|
public override Task ResolveAsync(ITenantResolveContext context)
|
|
{
|
|
_resolveAction(context);
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|
|
|