@ -0,0 +1,137 @@ |
|||
# EditorConfig is awesome: https://EditorConfig.org |
|||
# Please feel free to update it (by considering the code style of ABP Team). |
|||
# top-most EditorConfig file |
|||
root = true |
|||
|
|||
[*.cs] |
|||
|
|||
#Namespace settings |
|||
csharp_style_namespace_declarations = file_scoped |
|||
dotnet_diagnostic.IDE0161.severity = warning |
|||
|
|||
#Core editorconfig formatting - indentation |
|||
|
|||
#use tabs for indentation |
|||
indent_style = tabs |
|||
|
|||
#Formatting - indentation options |
|||
|
|||
#indent switch case contents. |
|||
csharp_indent_case_contents = true |
|||
#indent switch labels |
|||
csharp_indent_switch_labels = true |
|||
|
|||
#Formatting - new line options |
|||
|
|||
#place catch statements on a new line |
|||
csharp_new_line_before_catch = true |
|||
#place else statements on a new line |
|||
csharp_new_line_before_else = true |
|||
#require members of object intializers to be on separate lines |
|||
csharp_new_line_before_members_in_object_initializers = true |
|||
#require braces to be on a new line for object_collection_array_initializers, methods, control_blocks, types, and lambdas (also known as "Allman" style) |
|||
csharp_new_line_before_open_brace = object_collection_array_initializers, methods, control_blocks, types, lambdas |
|||
|
|||
#Formatting - organize using options |
|||
|
|||
#sort System.* using directives alphabetically, and place them before other usings |
|||
dotnet_sort_system_directives_first = true |
|||
|
|||
#Formatting - spacing options |
|||
|
|||
#require NO space between a cast and the value |
|||
csharp_space_after_cast = false |
|||
#require a space before the colon for bases or interfaces in a type declaration |
|||
csharp_space_after_colon_in_inheritance_clause = true |
|||
#require a space after a keyword in a control flow statement such as a for loop |
|||
csharp_space_after_keywords_in_control_flow_statements = true |
|||
#require a space before the colon for bases or interfaces in a type declaration |
|||
csharp_space_before_colon_in_inheritance_clause = true |
|||
#remove space within empty argument list parentheses |
|||
csharp_space_between_method_call_empty_parameter_list_parentheses = false |
|||
#remove space between method call name and opening parenthesis |
|||
csharp_space_between_method_call_name_and_opening_parenthesis = false |
|||
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call |
|||
csharp_space_between_method_call_parameter_list_parentheses = false |
|||
#remove space within empty parameter list parentheses for a method declaration |
|||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
|||
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list. |
|||
csharp_space_between_method_declaration_parameter_list_parentheses = false |
|||
|
|||
#Formatting - wrapping options |
|||
|
|||
#leave code block on single line |
|||
csharp_preserve_single_line_blocks = true |
|||
|
|||
#Style - Code block preferences |
|||
|
|||
#prefer curly braces even for one line of code |
|||
csharp_prefer_braces = true:suggestion |
|||
|
|||
#Style - expression bodied member options |
|||
|
|||
#prefer block bodies for constructors |
|||
csharp_style_expression_bodied_constructors = false:suggestion |
|||
#prefer block bodies for methods |
|||
csharp_style_expression_bodied_methods = false:suggestion |
|||
#prefer expression-bodied members for properties |
|||
csharp_style_expression_bodied_properties = true:suggestion |
|||
|
|||
#Style - expression level options |
|||
|
|||
#prefer out variables to be declared inline in the argument list of a method call when possible |
|||
csharp_style_inlined_variable_declaration = true:suggestion |
|||
#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them |
|||
dotnet_style_predefined_type_for_member_access = true:suggestion |
|||
|
|||
#Style - Expression-level preferences |
|||
|
|||
#prefer default over default(T) |
|||
csharp_prefer_simple_default_expression = true:suggestion |
|||
#prefer objects to be initialized using object initializers when possible |
|||
dotnet_style_object_initializer = true:suggestion |
|||
#prefer inferred tuple element names |
|||
dotnet_style_prefer_inferred_tuple_names = true:suggestion |
|||
|
|||
#Style - implicit and explicit types |
|||
|
|||
#prefer var over explicit type in all cases, unless overridden by another code style rule |
|||
csharp_style_var_elsewhere = true:suggestion |
|||
#prefer var is used to declare variables with built-in system types such as int |
|||
csharp_style_var_for_built_in_types = true:suggestion |
|||
#prefer var when the type is already mentioned on the right-hand side of a declaration expression |
|||
csharp_style_var_when_type_is_apparent = true:suggestion |
|||
|
|||
#Style - language keyword and framework type options |
|||
|
|||
#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them |
|||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
|||
|
|||
#Style - Miscellaneous preferences |
|||
|
|||
#prefer local functions over anonymous functions |
|||
csharp_style_pattern_local_over_anonymous_function = true:suggestion |
|||
|
|||
#Style - modifier options |
|||
|
|||
#prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods. |
|||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion |
|||
|
|||
#Style - Modifier preferences |
|||
|
|||
#when this rule is set to a list of modifiers, prefer the specified ordering. |
|||
csharp_preferred_modifier_order = public,protected,private,virtual,async,readonly,static,override,abstract:suggestion |
|||
|
|||
#Style - Pattern matching |
|||
|
|||
#prefer pattern matching instead of is expression with type casts |
|||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
|||
|
|||
#Style - qualification options |
|||
|
|||
#prefer fields not to be prefaced with this. or Me. in Visual Basic |
|||
dotnet_style_qualification_for_field = false:suggestion |
|||
#prefer methods not to be prefaced with this. or Me. in Visual Basic |
|||
dotnet_style_qualification_for_method = false:suggestion |
|||
#prefer properties not to be prefaced with this. or Me. in Visual Basic |
|||
dotnet_style_qualification_for_property = false:suggestion |
|||
|
After Width: | Height: | Size: 907 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 366 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 33 KiB |
@ -1,13 +1,12 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.ApiVersioning |
|||
namespace Volo.Abp.ApiVersioning; |
|||
|
|||
public class AbpApiVersioningAbstractionsModule : AbpModule |
|||
{ |
|||
public class AbpApiVersioningAbstractionsModule : AbpModule |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddSingleton<IRequestedApiVersion>(NullRequestedApiVersion.Instance); |
|||
} |
|||
context.Services.AddSingleton<IRequestedApiVersion>(NullRequestedApiVersion.Instance); |
|||
} |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.ApiVersioning |
|||
namespace Volo.Abp.ApiVersioning; |
|||
|
|||
public interface IRequestedApiVersion |
|||
{ |
|||
public interface IRequestedApiVersion |
|||
{ |
|||
string Current { get; } |
|||
} |
|||
string Current { get; } |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
namespace Volo.Abp.ApiVersioning |
|||
namespace Volo.Abp.ApiVersioning; |
|||
|
|||
public class NullRequestedApiVersion : IRequestedApiVersion |
|||
{ |
|||
public class NullRequestedApiVersion : IRequestedApiVersion |
|||
{ |
|||
public static NullRequestedApiVersion Instance = new NullRequestedApiVersion(); |
|||
public static NullRequestedApiVersion Instance = new NullRequestedApiVersion(); |
|||
|
|||
public string Current => null; |
|||
public string Current => null; |
|||
|
|||
private NullRequestedApiVersion() |
|||
{ |
|||
|
|||
private NullRequestedApiVersion() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,25 +1,24 @@ |
|||
using Microsoft.AspNetCore.Authentication; |
|||
using Microsoft.AspNetCore.Authentication.JwtBearer; |
|||
|
|||
namespace Microsoft.AspNetCore.Builder |
|||
namespace Microsoft.AspNetCore.Builder; |
|||
|
|||
public static class ApplicationBuilderAbpJwtTokenMiddlewareExtension |
|||
{ |
|||
public static class ApplicationBuilderAbpJwtTokenMiddlewareExtension |
|||
public static IApplicationBuilder UseJwtTokenMiddleware(this IApplicationBuilder app, string schema = JwtBearerDefaults.AuthenticationScheme) |
|||
{ |
|||
public static IApplicationBuilder UseJwtTokenMiddleware(this IApplicationBuilder app, string schema = JwtBearerDefaults.AuthenticationScheme) |
|||
return app.Use(async (ctx, next) => |
|||
{ |
|||
return app.Use(async (ctx, next) => |
|||
if (ctx.User.Identity?.IsAuthenticated != true) |
|||
{ |
|||
if (ctx.User.Identity?.IsAuthenticated != true) |
|||
var result = await ctx.AuthenticateAsync(schema); |
|||
if (result.Succeeded && result.Principal != null) |
|||
{ |
|||
var result = await ctx.AuthenticateAsync(schema); |
|||
if (result.Succeeded && result.Principal != null) |
|||
{ |
|||
ctx.User = result.Principal; |
|||
} |
|||
ctx.User = result.Principal; |
|||
} |
|||
} |
|||
|
|||
await next(); |
|||
}); |
|||
} |
|||
await next(); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Security; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Authentication.JwtBearer |
|||
namespace Volo.Abp.AspNetCore.Authentication.JwtBearer; |
|||
|
|||
[DependsOn(typeof(AbpSecurityModule))] |
|||
public class AbpAspNetCoreAuthenticationJwtBearerModule : AbpModule |
|||
{ |
|||
[DependsOn(typeof(AbpSecurityModule))] |
|||
public class AbpAspNetCoreAuthenticationJwtBearerModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
@ -1,57 +1,56 @@ |
|||
using Volo.Abp.AspNetCore.Authentication.OAuth.Claims; |
|||
using Volo.Abp.Security.Claims; |
|||
|
|||
namespace Microsoft.AspNetCore.Authentication.OAuth.Claims |
|||
namespace Microsoft.AspNetCore.Authentication.OAuth.Claims; |
|||
|
|||
public static class AbpClaimActionCollectionExtensions |
|||
{ |
|||
public static class AbpClaimActionCollectionExtensions |
|||
public static void MapAbpClaimTypes(this ClaimActionCollection claimActions) |
|||
{ |
|||
public static void MapAbpClaimTypes(this ClaimActionCollection claimActions) |
|||
if (AbpClaimTypes.UserName != "name") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.UserName, "name"); |
|||
claimActions.DeleteClaim("name"); |
|||
claimActions.RemoveDuplicate(AbpClaimTypes.UserName); |
|||
} |
|||
|
|||
if (AbpClaimTypes.Email != "email") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.Email, "email"); |
|||
claimActions.DeleteClaim("email"); |
|||
claimActions.RemoveDuplicate(AbpClaimTypes.Email); |
|||
} |
|||
|
|||
if (AbpClaimTypes.EmailVerified != "email_verified") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.EmailVerified, "email_verified"); |
|||
} |
|||
|
|||
if (AbpClaimTypes.PhoneNumber != "phone_number") |
|||
{ |
|||
if (AbpClaimTypes.UserName != "name") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.UserName, "name"); |
|||
claimActions.DeleteClaim("name"); |
|||
claimActions.RemoveDuplicate(AbpClaimTypes.UserName); |
|||
} |
|||
|
|||
if (AbpClaimTypes.Email != "email") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.Email, "email"); |
|||
claimActions.DeleteClaim("email"); |
|||
claimActions.RemoveDuplicate(AbpClaimTypes.Email); |
|||
} |
|||
|
|||
if (AbpClaimTypes.EmailVerified != "email_verified") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.EmailVerified, "email_verified"); |
|||
} |
|||
|
|||
if (AbpClaimTypes.PhoneNumber != "phone_number") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.PhoneNumber, "phone_number"); |
|||
} |
|||
|
|||
if (AbpClaimTypes.PhoneNumberVerified != "phone_number_verified") |
|||
{ |
|||
claimActions.MapJsonKey(AbpClaimTypes.PhoneNumberVerified, "phone_number_verified"); |
|||
} |
|||
|
|||
if (AbpClaimTypes.Role != "role") |
|||
{ |
|||
claimActions.MapJsonKeyMultiple(AbpClaimTypes.Role, "role"); |
|||
} |
|||
|
|||
claimActions.RemoveDuplicate(AbpClaimTypes.Name); |
|||
claimActions.MapJsonKey(AbpClaimTypes.PhoneNumber, "phone_number"); |
|||
} |
|||
|
|||
public static void MapJsonKeyMultiple(this ClaimActionCollection claimActions, string claimType, string jsonKey) |
|||
if (AbpClaimTypes.PhoneNumberVerified != "phone_number_verified") |
|||
{ |
|||
claimActions.Add(new MultipleClaimAction(claimType, jsonKey)); |
|||
claimActions.MapJsonKey(AbpClaimTypes.PhoneNumberVerified, "phone_number_verified"); |
|||
} |
|||
|
|||
public static void RemoveDuplicate(this ClaimActionCollection claimActions, string claimType) |
|||
|
|||
if (AbpClaimTypes.Role != "role") |
|||
{ |
|||
claimActions.Add(new RemoveDuplicateClaimAction(claimType)); |
|||
claimActions.MapJsonKeyMultiple(AbpClaimTypes.Role, "role"); |
|||
} |
|||
|
|||
claimActions.RemoveDuplicate(AbpClaimTypes.Name); |
|||
} |
|||
|
|||
public static void MapJsonKeyMultiple(this ClaimActionCollection claimActions, string claimType, string jsonKey) |
|||
{ |
|||
claimActions.Add(new MultipleClaimAction(claimType, jsonKey)); |
|||
} |
|||
|
|||
public static void RemoveDuplicate(this ClaimActionCollection claimActions, string claimType) |
|||
{ |
|||
claimActions.Add(new RemoveDuplicateClaimAction(claimType)); |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.Security; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Authentication.OAuth |
|||
namespace Volo.Abp.AspNetCore.Authentication.OAuth; |
|||
|
|||
[DependsOn(typeof(AbpSecurityModule))] |
|||
public class AbpAspNetCoreAuthenticationOAuthModule : AbpModule |
|||
{ |
|||
[DependsOn(typeof(AbpSecurityModule))] |
|||
public class AbpAspNetCoreAuthenticationOAuthModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling |
|||
namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling; |
|||
|
|||
public class BlazorStandardBundles |
|||
{ |
|||
public class BlazorStandardBundles |
|||
public static class Styles |
|||
{ |
|||
public static class Styles |
|||
{ |
|||
public static string Global = "Blazor.Global"; |
|||
} |
|||
public static string Global = "Blazor.Global"; |
|||
} |
|||
|
|||
public static class Scripts |
|||
{ |
|||
public static string Global = "Blazor.Global"; |
|||
} |
|||
public static class Scripts |
|||
{ |
|||
public static string Global = "Blazor.Global"; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
using System.Collections.Generic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling |
|||
namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling; |
|||
|
|||
public class BlazorGlobalScriptContributor : BundleContributor |
|||
{ |
|||
public class BlazorGlobalScriptContributor : BundleContributor |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
context.Files.AddIfNotContains("/_framework/blazor.server.js"); |
|||
context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js"); |
|||
} |
|||
context.Files.AddIfNotContains("/_framework/blazor.server.js"); |
|||
context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js"); |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public interface IPageToolbarContributor |
|||
{ |
|||
public interface IPageToolbarContributor |
|||
{ |
|||
Task ContributeAsync(PageToolbarContributionContext context); |
|||
} |
|||
Task ContributeAsync(PageToolbarContributionContext context); |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public interface IPageToolbarManager |
|||
{ |
|||
public interface IPageToolbarManager |
|||
{ |
|||
Task<PageToolbarItem[]> GetItemsAsync(PageToolbar toolbar); |
|||
} |
|||
Task<PageToolbarItem[]> GetItemsAsync(PageToolbar toolbar); |
|||
} |
|||
|
|||
@ -1,12 +1,11 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public class PageToolbar |
|||
{ |
|||
public class PageToolbar |
|||
{ |
|||
public PageToolbarContributorList Contributors { get; set; } |
|||
public PageToolbarContributorList Contributors { get; set; } |
|||
|
|||
public PageToolbar() |
|||
{ |
|||
Contributors = new PageToolbarContributorList(); |
|||
} |
|||
public PageToolbar() |
|||
{ |
|||
Contributors = new PageToolbarContributorList(); |
|||
} |
|||
} |
|||
|
|||
@ -1,21 +1,20 @@ |
|||
using JetBrains.Annotations; |
|||
using System; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public class PageToolbarContributionContext |
|||
{ |
|||
public class PageToolbarContributionContext |
|||
{ |
|||
[NotNull] |
|||
public IServiceProvider ServiceProvider { get; } |
|||
[NotNull] |
|||
public IServiceProvider ServiceProvider { get; } |
|||
|
|||
[NotNull] |
|||
public PageToolbarItemList Items { get; } |
|||
[NotNull] |
|||
public PageToolbarItemList Items { get; } |
|||
|
|||
public PageToolbarContributionContext( |
|||
[NotNull] IServiceProvider serviceProvider) |
|||
{ |
|||
ServiceProvider = Check.NotNull(serviceProvider, nameof(serviceProvider)); |
|||
Items = new PageToolbarItemList(); |
|||
} |
|||
public PageToolbarContributionContext( |
|||
[NotNull] IServiceProvider serviceProvider) |
|||
{ |
|||
ServiceProvider = Check.NotNull(serviceProvider, nameof(serviceProvider)); |
|||
Items = new PageToolbarItemList(); |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public abstract class PageToolbarContributor : IPageToolbarContributor |
|||
{ |
|||
public abstract class PageToolbarContributor : IPageToolbarContributor |
|||
{ |
|||
public abstract Task ContributeAsync(PageToolbarContributionContext context); |
|||
} |
|||
public abstract Task ContributeAsync(PageToolbarContributionContext context); |
|||
} |
|||
|
|||
@ -1,8 +1,7 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public class PageToolbarContributorList : List<IPageToolbarContributor> |
|||
{ |
|||
public class PageToolbarContributorList : List<IPageToolbarContributor> |
|||
{ |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public class PageToolbarDictionary : Dictionary<string, PageToolbar> |
|||
{ |
|||
public class PageToolbarDictionary : Dictionary<string, PageToolbar> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.PageToolbars; |
|||
|
|||
public class PageToolbarItemList : List<PageToolbarItem> |
|||
{ |
|||
public class PageToolbarItemList : List<PageToolbarItem> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System.Reflection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Routing |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Routing; |
|||
|
|||
public class AbpRouterOptions |
|||
{ |
|||
public class AbpRouterOptions |
|||
{ |
|||
public Assembly AppAssembly { get; set; } |
|||
public Assembly AppAssembly { get; set; } |
|||
|
|||
public RouterAssemblyList AdditionalAssemblies { get; } |
|||
public RouterAssemblyList AdditionalAssemblies { get; } |
|||
|
|||
public AbpRouterOptions() |
|||
{ |
|||
AdditionalAssemblies = new RouterAssemblyList(); |
|||
} |
|||
public AbpRouterOptions() |
|||
{ |
|||
AdditionalAssemblies = new RouterAssemblyList(); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using System.Collections.Generic; |
|||
using System.Reflection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Routing |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Routing; |
|||
|
|||
public class RouterAssemblyList : List<Assembly> |
|||
{ |
|||
public class RouterAssemblyList : List<Assembly> |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public class AbpToolbarOptions |
|||
{ |
|||
public class AbpToolbarOptions |
|||
{ |
|||
[NotNull] |
|||
public List<IToolbarContributor> Contributors { get; } |
|||
[NotNull] |
|||
public List<IToolbarContributor> Contributors { get; } |
|||
|
|||
public AbpToolbarOptions() |
|||
{ |
|||
Contributors = new List<IToolbarContributor>(); |
|||
} |
|||
public AbpToolbarOptions() |
|||
{ |
|||
Contributors = new List<IToolbarContributor>(); |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public interface IToolbarContributor |
|||
{ |
|||
public interface IToolbarContributor |
|||
{ |
|||
Task ConfigureToolbarAsync(IToolbarConfigurationContext context); |
|||
} |
|||
} |
|||
Task ConfigureToolbarAsync(IToolbarConfigurationContext context); |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public interface IToolbarManager |
|||
{ |
|||
public interface IToolbarManager |
|||
{ |
|||
Task<Toolbar> GetAsync(string name); |
|||
} |
|||
Task<Toolbar> GetAsync(string name); |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public static class StandardToolbars |
|||
{ |
|||
public static class StandardToolbars |
|||
{ |
|||
public const string Main = "Main"; |
|||
} |
|||
} |
|||
public const string Main = "Main"; |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public class Toolbar |
|||
{ |
|||
public class Toolbar |
|||
{ |
|||
public string Name { get; } |
|||
public string Name { get; } |
|||
|
|||
public List<ToolbarItem> Items { get; } |
|||
public List<ToolbarItem> Items { get; } |
|||
|
|||
public Toolbar([NotNull] string name) |
|||
{ |
|||
Name = Check.NotNull(name, nameof(name)); |
|||
Items = new List<ToolbarItem>(); |
|||
} |
|||
public Toolbar([NotNull] string name) |
|||
{ |
|||
Name = Check.NotNull(name, nameof(name)); |
|||
Items = new List<ToolbarItem>(); |
|||
} |
|||
} |
|||
|
|||
@ -1,23 +1,21 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Theming.Toolbars; |
|||
|
|||
public class ToolbarItem |
|||
{ |
|||
public class ToolbarItem |
|||
{ |
|||
public Type ComponentType |
|||
{ |
|||
get => _componentType; |
|||
set => _componentType = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private Type _componentType; |
|||
public Type ComponentType { |
|||
get => _componentType; |
|||
set => _componentType = Check.NotNull(value, nameof(value)); |
|||
} |
|||
private Type _componentType; |
|||
|
|||
public int Order { get; set; } |
|||
public int Order { get; set; } |
|||
|
|||
public ToolbarItem([NotNull] Type componentType, int order = 0) |
|||
{ |
|||
Order = order; |
|||
ComponentType = Check.NotNull(componentType, nameof(componentType)); |
|||
} |
|||
public ToolbarItem([NotNull] Type componentType, int order = 0) |
|||
{ |
|||
Order = order; |
|||
ComponentType = Check.NotNull(componentType, nameof(componentType)); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,13 +1,12 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public class AbpAspNetCoreApplicationCreationOptions |
|||
{ |
|||
public class AbpAspNetCoreApplicationCreationOptions |
|||
{ |
|||
public AbpApplicationCreationOptions ApplicationCreationOptions { get; } |
|||
public AbpApplicationCreationOptions ApplicationCreationOptions { get; } |
|||
|
|||
public AbpAspNetCoreApplicationCreationOptions( |
|||
AbpApplicationCreationOptions applicationCreationOptions) |
|||
{ |
|||
ApplicationCreationOptions = applicationCreationOptions; |
|||
} |
|||
public AbpAspNetCoreApplicationCreationOptions( |
|||
AbpApplicationCreationOptions applicationCreationOptions) |
|||
{ |
|||
ApplicationCreationOptions = applicationCreationOptions; |
|||
} |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
using Volo.Abp.AspNetCore.Components.Alerts; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Alerts |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Alerts; |
|||
|
|||
public class AlertManager : IAlertManager, IScopedDependency |
|||
{ |
|||
public class AlertManager : IAlertManager, IScopedDependency |
|||
{ |
|||
public AlertList Alerts { get; } |
|||
public AlertList Alerts { get; } |
|||
|
|||
public AlertManager() |
|||
{ |
|||
Alerts = new AlertList(); |
|||
} |
|||
public AlertManager() |
|||
{ |
|||
Alerts = new AlertList(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration; |
|||
|
|||
public interface ICurrentApplicationConfigurationCacheResetService |
|||
{ |
|||
public interface ICurrentApplicationConfigurationCacheResetService |
|||
{ |
|||
Task ResetAsync(); |
|||
} |
|||
} |
|||
Task ResetAsync(); |
|||
} |
|||
|
|||
@ -1,13 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration; |
|||
|
|||
public class NullCurrentApplicationConfigurationCacheResetService : ICurrentApplicationConfigurationCacheResetService, ISingletonDependency |
|||
{ |
|||
public class NullCurrentApplicationConfigurationCacheResetService : ICurrentApplicationConfigurationCacheResetService, ISingletonDependency |
|||
public Task ResetAsync() |
|||
{ |
|||
public Task ResetAsync() |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public class CookieOptions |
|||
{ |
|||
public class CookieOptions |
|||
{ |
|||
public DateTimeOffset? ExpireDate { get; set; } |
|||
public string Path { get; set; } |
|||
public bool Secure { get; set; } |
|||
} |
|||
} |
|||
public DateTimeOffset? ExpireDate { get; set; } |
|||
public string Path { get; set; } |
|||
public bool Secure { get; set; } |
|||
} |
|||
|
|||
@ -1,13 +1,12 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public class DefaultServerUrlProvider : IServerUrlProvider, ISingletonDependency |
|||
{ |
|||
public class DefaultServerUrlProvider : IServerUrlProvider, ISingletonDependency |
|||
public Task<string> GetBaseUrlAsync(string remoteServiceName = null) |
|||
{ |
|||
public Task<string> GetBaseUrlAsync(string remoteServiceName = null) |
|||
{ |
|||
return Task.FromResult("/"); |
|||
} |
|||
return Task.FromResult("/"); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,12 +1,11 @@ |
|||
using System; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.DependencyInjection |
|||
namespace Volo.Abp.AspNetCore.Components.Web.DependencyInjection; |
|||
|
|||
public class ComponentsClientScopeServiceProviderAccessor : |
|||
IClientScopeServiceProviderAccessor, |
|||
ISingletonDependency |
|||
{ |
|||
public class ComponentsClientScopeServiceProviderAccessor : |
|||
IClientScopeServiceProviderAccessor, |
|||
ISingletonDependency |
|||
{ |
|||
public IServiceProvider ServiceProvider { get; set; } |
|||
} |
|||
public IServiceProvider ServiceProvider { get; set; } |
|||
} |
|||
|
|||
@ -1,38 +1,37 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.ExceptionHandling |
|||
namespace Volo.Abp.AspNetCore.Components.Web.ExceptionHandling; |
|||
|
|||
public class AbpExceptionHandlingLoggerProvider : ILoggerProvider |
|||
{ |
|||
public class AbpExceptionHandlingLoggerProvider : ILoggerProvider |
|||
{ |
|||
private AbpExceptionHandlingLogger _logger; |
|||
private static readonly object SyncObj = new object(); |
|||
private readonly IServiceCollection _serviceCollection; |
|||
private AbpExceptionHandlingLogger _logger; |
|||
private static readonly object SyncObj = new object(); |
|||
private readonly IServiceCollection _serviceCollection; |
|||
|
|||
public AbpExceptionHandlingLoggerProvider(IServiceCollection serviceCollection) |
|||
{ |
|||
_serviceCollection = serviceCollection; |
|||
} |
|||
public AbpExceptionHandlingLoggerProvider(IServiceCollection serviceCollection) |
|||
{ |
|||
_serviceCollection = serviceCollection; |
|||
} |
|||
|
|||
public ILogger CreateLogger(string categoryName) |
|||
public ILogger CreateLogger(string categoryName) |
|||
{ |
|||
if (_logger == null) |
|||
{ |
|||
if (_logger == null) |
|||
lock (SyncObj) |
|||
{ |
|||
lock (SyncObj) |
|||
if (_logger == null) |
|||
{ |
|||
if (_logger == null) |
|||
{ |
|||
_logger = new AbpExceptionHandlingLogger(_serviceCollection); |
|||
} |
|||
_logger = new AbpExceptionHandlingLogger(_serviceCollection); |
|||
} |
|||
} |
|||
|
|||
return _logger; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
return _logger; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions; |
|||
|
|||
public class EntityAction : IEquatable<EntityAction> |
|||
{ |
|||
public class EntityAction : IEquatable<EntityAction> |
|||
public string Text { get; set; } |
|||
public Func<object, Task> Clicked { get; set; } |
|||
public Func<object, string> ConfirmationMessage { get; set; } |
|||
public bool Primary { get; set; } |
|||
public object Color { get; set; } |
|||
public string Icon { get; set; } |
|||
public Func<object, bool> Visible { get; set; } |
|||
public bool Equals(EntityAction other) |
|||
{ |
|||
public string Text { get; set; } |
|||
public Func<object, Task> Clicked { get; set; } |
|||
public Func<object, string> ConfirmationMessage { get; set; } |
|||
public bool Primary { get; set; } |
|||
public object Color { get; set; } |
|||
public string Icon { get; set; } |
|||
public Func<object, bool> Visible { get; set; } |
|||
public bool Equals(EntityAction other) |
|||
{ |
|||
return string.Equals(Text, other?.Text, StringComparison.OrdinalIgnoreCase); |
|||
} |
|||
return string.Equals(Text, other?.Text, StringComparison.OrdinalIgnoreCase); |
|||
} |
|||
} |
|||
|
|||
@ -1,12 +1,11 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions; |
|||
|
|||
public class EntityActionDictionary : Dictionary<string, List<EntityAction>> |
|||
{ |
|||
public class EntityActionDictionary : Dictionary<string, List<EntityAction>> |
|||
public List<EntityAction> Get<T>() |
|||
{ |
|||
public List<EntityAction> Get<T>() |
|||
{ |
|||
return this.GetOrAdd(typeof(T).FullName, () => new List<EntityAction>()); |
|||
} |
|||
return this.GetOrAdd(typeof(T).FullName, () => new List<EntityAction>()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using System.Threading.Tasks; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility; |
|||
|
|||
public interface ILookupApiRequestService |
|||
{ |
|||
public interface ILookupApiRequestService |
|||
{ |
|||
Task<string> SendAsync([NotNull]string url); |
|||
} |
|||
} |
|||
Task<string> SendAsync([NotNull] string url); |
|||
} |
|||
|
|||
@ -1,12 +1,11 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns |
|||
namespace Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns; |
|||
|
|||
public class TableColumnDictionary : Dictionary<string, List<TableColumn>> |
|||
{ |
|||
public class TableColumnDictionary : Dictionary<string, List<TableColumn>> |
|||
public List<TableColumn> Get<T>() |
|||
{ |
|||
public List<TableColumn> Get<T>() |
|||
{ |
|||
return this.GetOrAdd(typeof(T).FullName, () => new List<TableColumn>()); |
|||
} |
|||
return this.GetOrAdd(typeof(T).FullName, () => new List<TableColumn>()); |
|||
} |
|||
} |
|||
} |
|||
|
|||