mirror of https://github.com/abpframework/abp.git
65 changed files with 166 additions and 96 deletions
@ -0,0 +1,26 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<AssemblyName>Volo.Abp.Ddd.Domain</AssemblyName> |
|||
<PackageId>Volo.Abp.Ddd.Domain</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.Core\Volo.Abp.Core.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.EventBus\Volo.Abp.EventBus.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.Guids\Volo.Abp.Guids.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Abstractions\Volo.Abp.MultiTenancy.Abstractions.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.Threading\Volo.Abp.Threading.csproj" /> |
|||
<ProjectReference Include="..\Volo.Abp.Uow\Volo.Abp.Uow.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,2 @@ |
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp71</s:String></wpf:ResourceDictionary> |
|||
@ -0,0 +1,27 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EventBus; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.Threading; |
|||
using Volo.Abp.Uow; |
|||
|
|||
namespace Volo.Abp.Domain |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpDataModule), |
|||
typeof(AbpEventBusModule), |
|||
typeof(AbpGuidsModule), |
|||
typeof(AbpMultiTenancyAbstractionsModule), |
|||
typeof(AbpThreadingModule), |
|||
typeof(AbpUnitOfWorkModule) |
|||
)] |
|||
public class AbpDddDomainModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddAssemblyOf<AbpDddDomainModule>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
using System; |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Volo.Abp.Guids; |
|||
|
|||
namespace Volo.Abp.Domain.Services |
|||
{ |
|||
public abstract class DomainService : IDomainService |
|||
{ |
|||
public IGuidGenerator GuidGenerator { get; set; } |
|||
|
|||
public ILoggerFactory LoggerFactory { get; set; } |
|||
|
|||
protected ILogger Logger => _lazyLogger.Value; |
|||
private Lazy<ILogger> _lazyLogger => new Lazy<ILogger>(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true); |
|||
|
|||
protected DomainService() |
|||
{ |
|||
GuidGenerator = SimpleGuidGenerator.Instance; |
|||
} |
|||
} |
|||
} |
|||
@ -1,38 +0,0 @@ |
|||
using System; |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Volo.Abp.Uow; |
|||
|
|||
namespace Volo.Abp |
|||
{ |
|||
public abstract class AbpServiceBase //TODO: This is not so related to DDD, can we move to another package or completely remove it..?
|
|||
{ |
|||
public IUnitOfWorkManager UnitOfWorkManager { get; set; } |
|||
|
|||
public IObjectMapper ObjectMapper { get; set; } |
|||
|
|||
public IGuidGenerator GuidGenerator { get; set; } |
|||
|
|||
public ILoggerFactory LoggerFactory { get; set; } |
|||
|
|||
public ICurrentTenant CurrentTenant { get; set; } |
|||
|
|||
protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current; |
|||
|
|||
protected ILogger Logger => _lazyLogger.Value; |
|||
private Lazy<ILogger> _lazyLogger => new Lazy<ILogger>(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true); |
|||
|
|||
/* Will be added when developed |
|||
- Setting manager |
|||
- Localization manager and helper methods |
|||
*/ |
|||
|
|||
protected AbpServiceBase() |
|||
{ |
|||
GuidGenerator = SimpleGuidGenerator.Instance; |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
namespace Volo.Abp.Domain.Services |
|||
{ |
|||
public abstract class DomainService : AbpServiceBase, IDomainService |
|||
{ |
|||
|
|||
} |
|||
} |
|||
Loading…
Reference in new issue