mirror of https://github.com/abpframework/abp.git
3 changed files with 39 additions and 9 deletions
@ -0,0 +1,27 @@ |
|||||
|
using System; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using Microsoft.Extensions.Logging.Abstractions; |
||||
|
using Volo.Abp.ObjectMapping; |
||||
|
using Volo.Abp.Uow; |
||||
|
|
||||
|
namespace Volo.Abp |
||||
|
{ |
||||
|
public abstract class AbpServiceBase |
||||
|
{ |
||||
|
public IUnitOfWorkManager UnitOfWorkManager { get; set; } |
||||
|
|
||||
|
public IObjectMapper ObjectMapper { get; set; } |
||||
|
|
||||
|
protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current; |
||||
|
|
||||
|
public ILoggerFactory LoggerFactory { get; set; } |
||||
|
|
||||
|
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 |
||||
|
*/ |
||||
|
} |
||||
|
} |
||||
@ -1,14 +1,10 @@ |
|||||
using Volo.Abp.ObjectMapping; |
|
||||
using Volo.Abp.Uow; |
|
||||
|
|
||||
namespace Volo.Abp.Application.Services |
namespace Volo.Abp.Application.Services |
||||
{ |
{ |
||||
public abstract class ApplicationService : IApplicationService |
public abstract class ApplicationService : AbpServiceBase, IApplicationService |
||||
{ |
{ |
||||
public IUnitOfWorkManager UnitOfWorkManager { get; set; } |
/* Will be added when implemented |
||||
|
- AbpSession |
||||
public IObjectMapper ObjectMapper { get; set; } |
- ... |
||||
|
*/ |
||||
protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager.Current; |
|
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
namespace Volo.Abp.Domain.Services |
||||
|
{ |
||||
|
public abstract class DomainService : AbpServiceBase, IDomainService |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue