Browse Source
Merge pull request #1739 from abphub/patch-1
Replace ITenantResolver with ITenantResolveContributor
pull/1746/head
maliming
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
6 deletions
-
docs/en/Multi-Tenancy.md
-
docs/zh-Hans/Multi-Tenancy.md
|
|
|
@ -114,7 +114,7 @@ namespace MyCompany.MyProject |
|
|
|
{ |
|
|
|
Configure<TenantResolveOptions>(options => |
|
|
|
{ |
|
|
|
options.TenantResolvers.Add(new MyCustomTenantResolver()); |
|
|
|
options.TenantResolvers.Add(new MyCustomTenantResolveContributor()); |
|
|
|
}); |
|
|
|
|
|
|
|
//... |
|
|
|
@ -123,14 +123,14 @@ namespace MyCompany.MyProject |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
MyCustomTenantResolver must implement **ITenantResolver** as shown below: |
|
|
|
`MyCustomTenantResolveContributor` must implement **ITenantResolveContributor** as shown below: |
|
|
|
|
|
|
|
````C# |
|
|
|
using Volo.Abp.MultiTenancy; |
|
|
|
|
|
|
|
namespace MyCompany.MyProject |
|
|
|
{ |
|
|
|
public class MyCustomTenantResolver : ITenantResolver |
|
|
|
public class MyCustomTenantResolveContributor : ITenantResolveContributor |
|
|
|
{ |
|
|
|
public void Resolve(ITenantResolveContext context) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -115,7 +115,7 @@ namespace MyCompany.MyProject |
|
|
|
{ |
|
|
|
Configure<TenantResolveOptions>(options => |
|
|
|
{ |
|
|
|
options.TenantResolvers.Add(new MyCustomTenantResolver()); |
|
|
|
options.TenantResolvers.Add(new MyCustomTenantResolveContributor()); |
|
|
|
}); |
|
|
|
|
|
|
|
//... |
|
|
|
@ -124,14 +124,14 @@ namespace MyCompany.MyProject |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
MyCustomTenantResolver必须像下面这样实现**ITenantResolver**接口: |
|
|
|
`MyCustomTenantResolveContributor`必须像下面这样实现**ITenantResolveContributor**接口: |
|
|
|
|
|
|
|
````C# |
|
|
|
using Volo.Abp.MultiTenancy; |
|
|
|
|
|
|
|
namespace MyCompany.MyProject |
|
|
|
{ |
|
|
|
public class MyCustomTenantResolver : ITenantResolver |
|
|
|
public class MyCustomTenantResolveContributor : ITenantResolveContributor |
|
|
|
{ |
|
|
|
public void Resolve(ITenantResolveContext context) |
|
|
|
{ |
|
|
|
|