mirror of https://github.com/abpframework/abp
parent
d67e8a24d2
commit
f033f0a6ce
@ -0,0 +1,3 @@
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<ConfigureAwait ContinueOnCapturedContext="false" />
|
||||
</Weavers>
|
@ -0,0 +1,28 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\configureawait.props" />
|
||||
<Import Project="..\..\..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
|
||||
<AssemblyName>Volo.Abp.MultiTenancy.Abstractions</AssemblyName>
|
||||
<PackageId>Volo.Abp.MultiTenancy.Abstractions</PackageId>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
<RootNamespace />
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
|
||||
<ProjectReference Include="..\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
|
||||
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Volo\Abp\MultiTenancy\Localization\*.json" />
|
||||
<EmbeddedResource Include="Volo\Abp\MultiTenancy\Localization\*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,9 @@
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace Volo.Abp.MultiTenancy.Localization;
|
||||
|
||||
[LocalizationResourceName("AbpMultiTenancy")]
|
||||
public class AbpMultiTenancyResource
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"culture": "en-GB",
|
||||
"texts": {
|
||||
"TenantNotFoundMessage": "Tenant not found!",
|
||||
"TenantNotFoundDetails": "There is no tenant with the tenant id or name: {0}",
|
||||
"TenantNotActiveMessage": "Tenant is not active!",
|
||||
"TenantNotActiveDetails": "The tenant is not active with the tenant id or name: {0}"
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"culture": "en",
|
||||
"texts": {
|
||||
"TenantNotFoundMessage": "Tenant not found!",
|
||||
"TenantNotFoundDetails": "There is no tenant with the tenant id or name: {0}",
|
||||
"TenantNotActiveMessage": "Tenant is not active!",
|
||||
"TenantNotActiveDetails": "The tenant is not active with the tenant id or name: {0}"
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"culture": "zh-Hans",
|
||||
"texts": {
|
||||
"TenantNotFoundMessage": "找不到租户!",
|
||||
"TenantNotFoundDetails": "无法找到ID或名称为{0}的租户",
|
||||
"TenantNotActiveMessage": "租户未启用!",
|
||||
"TenantNotActiveDetails": "ID或名称为{0}的租户未启用"
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"culture": "zh-Hant",
|
||||
"texts": {
|
||||
"TenantNotFoundMessage": "找不到租戶!",
|
||||
"TenantNotFoundDetails": "無法找到ID或名稱為{0}的租戶",
|
||||
"TenantNotActiveMessage": "租戶未啟用!",
|
||||
"TenantNotActiveDetails": "ID或名稱為{0}的租戶未啟用"
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace Volo.Abp.MultiTenancy;
|
||||
|
||||
public class TenantResolveContext : ITenantResolveContext
|
||||
{
|
||||
public IServiceProvider ServiceProvider { get; }
|
||||
|
||||
public string TenantIdOrName { get; set; }
|
||||
|
||||
public bool Handled { get; set; }
|
||||
|
||||
public bool HasResolvedTenantOrHost()
|
||||
{
|
||||
return Handled || TenantIdOrName != null;
|
||||
}
|
||||
|
||||
public TenantResolveContext(IServiceProvider serviceProvider)
|
||||
{
|
||||
ServiceProvider = serviceProvider;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue