Browse Source

Fixed #364: Interceptor problems for controllers derived from Controller class.

pull/400/head
Halil ibrahim Kalkan 8 years ago
parent
commit
4c04931b63
  1. 13
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs
  2. 15
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs
  3. 7
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs
  4. 4
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs
  5. 6
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs
  6. 6
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs

13
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs

@ -6,16 +6,27 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Aspects;
using Volo.Abp.Auditing;
using Volo.Abp.Authorization;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Timing;
using Volo.Abp.Uow;
using Volo.Abp.Users;
using Volo.Abp.Validation;
namespace Volo.Abp.Application.Services
{
public abstract class ApplicationService : IApplicationService, IAvoidDuplicateCrossCuttingConcerns
public abstract class ApplicationService :
IApplicationService,
IAvoidDuplicateCrossCuttingConcerns,
IValidationEnabled,
IUnitOfWorkEnabled,
IAuthorizationEnabled,
IAuditingEnabled,
ITransientDependency
{
public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "Service" };

15
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/IApplicationService.cs

@ -1,21 +1,10 @@
using Volo.Abp.Auditing;
using Volo.Abp.Authorization;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Uow;
using Volo.Abp.Validation;
namespace Volo.Abp.Application.Services
namespace Volo.Abp.Application.Services
{
/// <summary>
/// This interface must be implemented by all application services to register and identify them by convention.
/// </summary>
public interface IApplicationService :
ITransientDependency,
IRemoteService,
IUnitOfWorkEnabled,
IValidationEnabled,
IAuthorizationEnabled,
IAuditingEnabled
IRemoteService
{
}

7
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs

@ -5,10 +5,15 @@ using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain.Repositories
{
public abstract class BasicRepositoryBase<TEntity> : IBasicRepository<TEntity>, IServiceProviderAccessor
public abstract class BasicRepositoryBase<TEntity> :
IBasicRepository<TEntity>,
IServiceProviderAccessor,
IUnitOfWorkEnabled,
ITransientDependency
where TEntity : class, IEntity
{
public IServiceProvider ServiceProvider { get; set; }

4
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs

@ -3,16 +3,14 @@ using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain.Repositories
{
/// <summary>
/// Just to mark a class as repository.
/// </summary>
public interface IRepository : IUnitOfWorkEnabled, ITransientDependency
public interface IRepository
{
}

6
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs

@ -3,17 +3,15 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.PermissionManagement;
namespace Volo.Abp.Identity
{
[RemoteService]
[Area("identity")]
[Controller]
[ControllerName("Role")]
public class IdentityRoleController : IIdentityRoleAppService, ITransientDependency
public class IdentityRoleController : AbpController, IIdentityRoleAppService
{
private readonly IIdentityRoleAppService _roleAppService;

6
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs

@ -2,17 +2,15 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.PermissionManagement;
namespace Volo.Abp.Identity
{
[RemoteService]
[Area("identity")]
[Controller]
[ControllerName("User")]
public class IdentityUserController : IIdentityUserAppService, ITransientDependency //TODO: Try to implement these type wrapper controllers automatically!
public class IdentityUserController : AbpController, IIdentityUserAppService
{
private readonly IIdentityUserAppService _userAppService;

Loading…
Cancel
Save