Skip to content

Commit

Permalink
types: 调整文件名和GlobalUsing
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Jul 4, 2023
1 parent 9587778 commit beb4e10
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 53 deletions.
19 changes: 18 additions & 1 deletion aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,21 @@
global using Microsoft.Extensions.DependencyInjection.Extensions;
global using Volo.Abp.Authorization.Permissions;
global using Volo.Abp.Json;
global using Volo.Abp.Localization;
global using Volo.Abp.Localization;
global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Reflection;
global using DotNetCore.CAP;
global using DotNetCore.CAP.Internal;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Options;
global using Volo.Abp.DependencyInjection;
global using Volo.Abp.EventBus;
global using Volo.Abp.EventBus.Distributed;
global using System.Collections.Concurrent;
global using Volo.Abp;
global using Volo.Abp.MultiTenancy;
global using Volo.Abp.Threading;
global using Volo.Abp.Uow;
global using Volo.Abp.Modularity;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
global using System.Collections.Concurrent;
global using System.Runtime.Serialization;
global using Elasticsearch.Net;
global using Lion.AbpPro.ElasticSearch.Exceptions;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Nest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Lion.AbpPro.ElasticSearch.Exceptions;

namespace Lion.AbpPro.ElasticSearch;
namespace Lion.AbpPro.ElasticSearch;

public abstract class ElasticSearchRepository<TEntity> : IBasicElasticSearchRepository<TEntity>
where TEntity : class, IElasticSearchEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Lion.AbpPro.ElasticSearch.Exceptions;

namespace Lion.AbpPro.ElasticSearch;
namespace Lion.AbpPro.ElasticSearch;

public interface IBasicElasticSearchRepository<TEntity> where TEntity : class, IElasticSearchEntity
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Lion.AbpPro.BasicManagement.ApplicationConfigurations;

[Dependency(ReplaceServices = true)]
public class LionAbpApplicationConfigurationAppService : ApplicationService, IAbpApplicationConfigurationAppService
public class AbpProApplicationConfigurationAppService : ApplicationService, IAbpApplicationConfigurationAppService
{
private readonly AbpLocalizationOptions _localizationOptions;
private readonly AbpMultiTenancyOptions _multiTenancyOptions;
Expand All @@ -21,7 +21,7 @@ public class LionAbpApplicationConfigurationAppService : ApplicationService, IAb
private readonly AbpClockOptions _abpClockOptions;
private readonly ICachedObjectExtensionsDtoService _cachedObjectExtensionsDtoService;

public LionAbpApplicationConfigurationAppService(
public AbpProApplicationConfigurationAppService(
IOptions<AbpLocalizationOptions> localizationOptions,
IOptions<AbpMultiTenancyOptions> multiTenancyOptions,
IAbpAuthorizationPolicyProvider abpAuthorizationPolicyProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@
<ProjectReference Include="..\Lion.AbpPro.BasicManagement.Domain\Lion.AbpPro.BasicManagement.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<Content Remove="C:\Users\wangjun\.nuget\packages\volo.abp.aspnetcore.mvc\7.2.2\contentFiles\any\net7.0\Volo.Abp.AspNetCore.Mvc.abppkg.json" />
<Content Remove="C:\Users\wangjun\.nuget\packages\volo.abp.aspnetcore.mvc\7.2.2\contentFiles\any\net7.0\Volo.Abp.AspNetCore.Mvc.abppkg.analyze.json" />
<Content Remove="C:\Users\wangjun\.nuget\packages\volo.abp.identity.aspnetcore\7.2.2\contentFiles\any\net7.0\Volo.Abp.Identity.AspNetCore.abppkg.json" />
<Content Remove="C:\Users\wangjun\.nuget\packages\volo.abp.identity.aspnetcore\7.2.2\contentFiles\any\net7.0\Volo.Abp.Identity.AspNetCore.abppkg.analyze.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
using Hangfire.Redis;
using Lion.AbpPro.CAP.EntityFrameworkCore;
using Microsoft.AspNetCore.Localization;
using Swagger;
using Volo.Abp.BackgroundJobs.Hangfire;
using Volo.Abp.Timing;

namespace Lion.AbpPro
{
[DependsOn(
Expand Down Expand Up @@ -43,25 +36,20 @@ public override void ConfigureServices(ServiceConfigurationContext context)
ConfigureCap(context);
ConfigureAuditLog(context);
ConfigurationSignalR(context);
context.Services.Configure<RequestLocalizationOptions>(options =>
{
//options.RequestCultureProviders.RemoveAll(provider => provider is AcceptLanguageHeaderRequestCultureProvider);
options.RequestCultureProviders.Add(new AbpProAcceptLanguageHeaderRequestCultureProvider());
});
ConfigurationMultiTenancy();
}

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var configuration = context.GetConfiguration();
app.UseLionRequestLocalization();
app.UseAbpProRequestLocalization();
app.UseCorrelationId();
app.UseStaticFiles();
if (configuration.GetValue("MiniProfiler:Enabled", false))
{
app.UseMiniProfiler();
}

app.UseRouting();
app.UseCors(AbpProHttpApiHostConst.DefaultCorsPolicyName);
app.UseAuthentication();
Expand All @@ -82,7 +70,6 @@ public override void OnApplicationInitialization(ApplicationInitializationContex

app.UseAuditing();
app.UseAbpSerilogEnrichers();

app.UseUnitOfWork();
app.UseConfiguredEndpoints(endpoints => { endpoints.MapHealthChecks("/health"); });
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
Expand Down Expand Up @@ -367,6 +354,10 @@ private void ConfigureAuditLog(ServiceConfigurationContext context)
});
}

private void ConfigurationMultiTenancy()
{
Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = MultiTenancyConsts.IsEnabled; });
}
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
global using Hangfire;
global using Hangfire.Common;
global using Hangfire.Dashboard;
global using Hangfire.Redis;
global using Hangfire.States;
global using Hangfire.Storage;
global using Lion.AbpPro.CAP;
global using Lion.AbpPro.CAP.EntityFrameworkCore;
global using Lion.AbpPro.EntityFrameworkCore;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.Extensions;
Expand Down Expand Up @@ -41,6 +43,7 @@
global using Savorboard.CAP.InMemoryMessageQueue;
global using Serilog;
global using StackExchange.Redis;
global using Swagger;
global using Swashbuckle.AspNetCore.SwaggerUI;
global using Volo.Abp;
global using Volo.Abp.Account.Web;
Expand All @@ -63,5 +66,6 @@
global using Volo.Abp.Http;
global using Volo.Abp.Json;
global using Volo.Abp.Modularity;
global using Volo.Abp.MultiTenancy;
global using Volo.Abp.Users;
global using Volo.Abp.Validation;
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Lion.AbpPro.BasicManagement;
using Lion.AbpPro.LanguageManagement;

namespace Lion.AbpPro
{
[DependsOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

global using System;
global using System.Threading.Tasks;
global using Lion.AbpPro.BasicManagement;
global using Lion.AbpPro.DataDictionaryManagement;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.LanguageManagement;
global using Volo.Abp.Application.Services;
global using Volo.Abp.Authorization.Permissions;
global using Volo.Abp.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Lion.AbpPro.LanguageManagement;

namespace Lion.AbpPro
{
[DependsOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
global using Lion.AbpPro.DataDictionaryManagement;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.FreeSqlRepository;
global using Lion.AbpPro.LanguageManagement;
global using Lion.AbpPro.NotificationManagement;
global using Lion.AbpPro.Permissions;
global using Microsoft.AspNetCore.Authorization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Lion.AbpPro.LanguageManagement;

namespace Lion.AbpPro
{
[DependsOn(
Expand All @@ -14,7 +12,6 @@ public class AbpProDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = MultiTenancyConsts.IsEnabled; });
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<AbpProDomainModule>(); });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
global using System.Threading.Tasks;
global using Lion.AbpPro.BasicManagement;
global using Lion.AbpPro.DataDictionaryManagement;
global using Lion.AbpPro.LanguageManagement;
global using Lion.AbpPro.MultiTenancy;
global using Lion.AbpPro.NotificationManagement;
global using Lion.AbpPro.Users.Dto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public static IApplicationBuilder UseRequestLog(this IApplicationBuilder app)
/// 多语言中间件
/// <remarks>浏览器传递的请求头:Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6而abp钟简体中文为:zh-Hans</remarks>
/// <example>
/// app.UseLionRequestLocalization();
/// app.UseAbpProRequestLocalization();
/// </example>
/// </summary>
public static IApplicationBuilder UseLionRequestLocalization(this IApplicationBuilder app)
public static IApplicationBuilder UseAbpProRequestLocalization(this IApplicationBuilder app)
{
if (app == null)
{
Expand Down

0 comments on commit beb4e10

Please sign in to comment.