diff --git a/Volo.Abp.sln b/Volo.Abp.sln index 271e9e3116..4fba1e3103 100644 --- a/Volo.Abp.sln +++ b/Volo.Abp.sln @@ -42,6 +42,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.ExtensionMethods", "sr EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.ExtensionMethods.Tests", "test\Volo.ExtensionMethods.Tests\Volo.ExtensionMethods.Tests.xproj", "{B520B696-86C7-46D2-A359-C2E9013A7BED}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.MultiTenancy", "src\Volo.Abp.MultiTenancy\Volo.Abp.MultiTenancy.xproj", "{58FA9F8F-216D-4C93-8929-D40D22B11CA7}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.MultiTenancy.Tests", "test\Volo.Abp.MultiTenancy.Tests\Volo.Abp.MultiTenancy.Tests.xproj", "{05271341-7A15-484C-9FD6-802A4193F4DE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -88,6 +92,14 @@ Global {B520B696-86C7-46D2-A359-C2E9013A7BED}.Debug|Any CPU.Build.0 = Debug|Any CPU {B520B696-86C7-46D2-A359-C2E9013A7BED}.Release|Any CPU.ActiveCfg = Release|Any CPU {B520B696-86C7-46D2-A359-C2E9013A7BED}.Release|Any CPU.Build.0 = Release|Any CPU + {58FA9F8F-216D-4C93-8929-D40D22B11CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58FA9F8F-216D-4C93-8929-D40D22B11CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58FA9F8F-216D-4C93-8929-D40D22B11CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58FA9F8F-216D-4C93-8929-D40D22B11CA7}.Release|Any CPU.Build.0 = Release|Any CPU + {05271341-7A15-484C-9FD6-802A4193F4DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05271341-7A15-484C-9FD6-802A4193F4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05271341-7A15-484C-9FD6-802A4193F4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05271341-7A15-484C-9FD6-802A4193F4DE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -108,5 +120,7 @@ Global {12E14D95-4ABA-4290-AB1D-CCF5EB158411} = {A3A3B258-B3D5-4FDE-9D84-CAA8CBB70586} {FC889503-0BF4-4959-AC80-F51073787025} = {9A4A646B-CC96-44FB-A717-E50C5C148B54} {B520B696-86C7-46D2-A359-C2E9013A7BED} = {82B41A0A-6068-410F-9C6B-2508CA763E21} + {58FA9F8F-216D-4C93-8929-D40D22B11CA7} = {4C753F64-0C93-4D65-96C2-A40893AFC1E8} + {05271341-7A15-484C-9FD6-802A4193F4DE} = {37087D1B-3693-4E96-983D-A69F210BDE53} EndGlobalSection EndGlobal diff --git a/src/Volo.Abp.MultiTenancy/ICurrentTenantAccessor.cs b/src/Volo.Abp.MultiTenancy/ICurrentTenantAccessor.cs new file mode 100644 index 0000000000..810002d45b --- /dev/null +++ b/src/Volo.Abp.MultiTenancy/ICurrentTenantAccessor.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; + +namespace Volo.Abp.MultiTenancy +{ + public interface ICurrentTenantAccessor + { + Guid Id { get; } + + string Name { get; } + } + + public class CurrentTenantAccessor : ICurrentTenantAccessor + { + public Guid Id => GetTenantId(); + + public string Name { get; } + + private readonly IEnumerable _currentTenantResolvers; + + public CurrentTenantAccessor(IEnumerable currentTenantResolvers) + { + _currentTenantResolvers = currentTenantResolvers; + } + + public virtual Guid GetTenantId() + { + throw new NotImplementedException(); + } + } + + public interface ICurrentTenantResolver + { + void Resolve(ICurrentTenantResolveContext context); + } + + public interface ICurrentTenantResolveContext + { + + } +} diff --git a/src/Volo.Abp.MultiTenancy/Properties/AssemblyInfo.cs b/src/Volo.Abp.MultiTenancy/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..feb0614d63 --- /dev/null +++ b/src/Volo.Abp.MultiTenancy/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Volo.Abp.MultiTenancy")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("58fa9f8f-216d-4c93-8929-d40d22b11ca7")] diff --git a/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.xproj b/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.xproj new file mode 100644 index 0000000000..8e3386368f --- /dev/null +++ b/src/Volo.Abp.MultiTenancy/Volo.Abp.MultiTenancy.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 58fa9f8f-216d-4c93-8929-d40d22b11ca7 + Volo.Abp.MultiTenancy + .\obj + .\bin\ + v4.6.1 + + + + 2.0 + + + diff --git a/src/Volo.Abp.MultiTenancy/project.json b/src/Volo.Abp.MultiTenancy/project.json new file mode 100644 index 0000000000..863659ace7 --- /dev/null +++ b/src/Volo.Abp.MultiTenancy/project.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0-*", + + "dependencies": { + "NETStandard.Library": "1.6.1", + "Volo.Abp": "1.0.0-*" + }, + + "frameworks": { + "netstandard1.6": { + "imports": "dnxcore50" + } + } +} diff --git a/test/AbpTestBase/project.json b/test/AbpTestBase/project.json index 1a4403d462..da032a0397 100644 --- a/test/AbpTestBase/project.json +++ b/test/AbpTestBase/project.json @@ -10,11 +10,11 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.1.0" } } } diff --git a/test/Apps/AspNetCoreDemo/project.json b/test/Apps/AspNetCoreDemo/project.json index 4738de3af5..e079132a8d 100644 --- a/test/Apps/AspNetCoreDemo/project.json +++ b/test/Apps/AspNetCoreDemo/project.json @@ -1,7 +1,7 @@ { "dependencies": { "Microsoft.NETCore.App": { - "version": "1.0.1", + "version": "1.1.0", "type": "platform" }, "Microsoft.AspNetCore.Diagnostics": "1.1.0", @@ -16,7 +16,7 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "imports": [ "dotnet5.6", "portable-net45+win8" diff --git a/test/Volo.Abp.AspNetCore.Tests/project.json b/test/Volo.Abp.AspNetCore.Tests/project.json index 31438a6cfb..57a4ceb8c0 100644 --- a/test/Volo.Abp.AspNetCore.Tests/project.json +++ b/test/Volo.Abp.AspNetCore.Tests/project.json @@ -9,11 +9,11 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.1.0" } } } diff --git a/test/Volo.Abp.MultiTenancy.Tests/Properties/AssemblyInfo.cs b/test/Volo.Abp.MultiTenancy.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..ec2d1d7efa --- /dev/null +++ b/test/Volo.Abp.MultiTenancy.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Volo.Abp.MultiTenancy.Tests")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("05271341-7a15-484c-9fd6-802a4193f4de")] diff --git a/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.xproj b/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.xproj new file mode 100644 index 0000000000..a34afbd089 --- /dev/null +++ b/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 05271341-7a15-484c-9fd6-802a4193f4de + Volo.Abp.MultiTenancy.Tests + .\obj + .\bin\ + v4.6.1 + + + + 2.0 + + + diff --git a/test/Volo.Abp.MultiTenancy.Tests/project.json b/test/Volo.Abp.MultiTenancy.Tests/project.json new file mode 100644 index 0000000000..1095588853 --- /dev/null +++ b/test/Volo.Abp.MultiTenancy.Tests/project.json @@ -0,0 +1,21 @@ +{ + "version": "1.0.0-*", + + "testRunner": "xunit", + + "dependencies": { + "AbpTestBase": "1.0.0-*", + "Volo.Abp.MultiTenancy": "1.0.0-*" + }, + + "frameworks": { + "netcoreapp1.1": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.1.0" + } + } + } + } +} diff --git a/test/Volo.Abp.Tests/project.json b/test/Volo.Abp.Tests/project.json index 444f2bc612..ef5e9cffd2 100644 --- a/test/Volo.Abp.Tests/project.json +++ b/test/Volo.Abp.Tests/project.json @@ -10,11 +10,11 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.1.0" } } } diff --git a/test/Volo.DependencyInjection.Tests/project.json b/test/Volo.DependencyInjection.Tests/project.json index 72a1566b22..3a56ca3129 100644 --- a/test/Volo.DependencyInjection.Tests/project.json +++ b/test/Volo.DependencyInjection.Tests/project.json @@ -9,11 +9,11 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.1.0" } } } diff --git a/test/Volo.ExtensionMethods.Tests/project.json b/test/Volo.ExtensionMethods.Tests/project.json index 8ac5f87aa2..e3ac6ea56c 100644 --- a/test/Volo.ExtensionMethods.Tests/project.json +++ b/test/Volo.ExtensionMethods.Tests/project.json @@ -9,11 +9,11 @@ }, "frameworks": { - "netcoreapp1.0": { + "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.1.0" } } }