mirror of https://github.com/abpframework/abp.git
committed by
GitHub
5212 changed files with 158611 additions and 164039 deletions
@ -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 |
|||
@ -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>()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,21 +1,20 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public interface IAbpUtilsService |
|||
{ |
|||
public interface IAbpUtilsService |
|||
{ |
|||
ValueTask AddClassToTagAsync(string tagName, string className); |
|||
ValueTask AddClassToTagAsync(string tagName, string className); |
|||
|
|||
ValueTask RemoveClassFromTagAsync(string tagName, string className); |
|||
ValueTask RemoveClassFromTagAsync(string tagName, string className); |
|||
|
|||
ValueTask<bool> HasClassOnTagAsync(string tagName, string className); |
|||
ValueTask<bool> HasClassOnTagAsync(string tagName, string className); |
|||
|
|||
ValueTask ReplaceLinkHrefByIdAsync(string linkId, string hrefValue); |
|||
ValueTask ReplaceLinkHrefByIdAsync(string linkId, string hrefValue); |
|||
|
|||
ValueTask ToggleFullscreenAsync(); |
|||
ValueTask ToggleFullscreenAsync(); |
|||
|
|||
ValueTask RequestFullscreenAsync(); |
|||
ValueTask RequestFullscreenAsync(); |
|||
|
|||
ValueTask ExitFullscreenAsync(); |
|||
} |
|||
ValueTask ExitFullscreenAsync(); |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public interface ICookieService |
|||
{ |
|||
public interface ICookieService |
|||
{ |
|||
public ValueTask SetAsync(string key, string value, CookieOptions options = null); |
|||
public ValueTask<string> GetAsync(string key); |
|||
public ValueTask DeleteAsync(string key, string path = null); |
|||
} |
|||
} |
|||
public ValueTask SetAsync(string key, string value, CookieOptions options = null); |
|||
public ValueTask<string> GetAsync(string key); |
|||
public ValueTask DeleteAsync(string key, string path = null); |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web |
|||
namespace Volo.Abp.AspNetCore.Components.Web; |
|||
|
|||
public interface IServerUrlProvider |
|||
{ |
|||
public interface IServerUrlProvider |
|||
{ |
|||
Task<string> GetBaseUrlAsync(string remoteServiceName = null); |
|||
} |
|||
} |
|||
Task<string> GetBaseUrlAsync(string remoteServiceName = null); |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
using Volo.Abp.AspNetCore.Components.Web.Theming; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming; |
|||
|
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreComponentsWebThemingModule), |
|||
typeof(AbpAspNetCoreComponentsWebAssemblyModule) |
|||
)] |
|||
public class AbpAspNetCoreComponentsWebAssemblyThemingModule : AbpModule |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreComponentsWebThemingModule), |
|||
typeof(AbpAspNetCoreComponentsWebAssemblyModule) |
|||
)] |
|||
public class AbpAspNetCoreComponentsWebAssemblyThemingModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
@ -1,31 +1,30 @@ |
|||
using Volo.Abp.Bundling; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming; |
|||
|
|||
public class ComponentsComponentsBundleContributor : IBundleContributor |
|||
{ |
|||
public class ComponentsComponentsBundleContributor : IBundleContributor |
|||
public void AddScripts(BundleContext context) |
|||
{ |
|||
public void AddScripts(BundleContext context) |
|||
{ |
|||
context.Add("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"); |
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js"); |
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js"); |
|||
} |
|||
context.Add("_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"); |
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js"); |
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/lang-utils.js"); |
|||
} |
|||
|
|||
public void AddStyles(BundleContext context) |
|||
public void AddStyles(BundleContext context) |
|||
{ |
|||
context.BundleDefinitions.Insert(0, new BundleDefinition |
|||
{ |
|||
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/bootstrap/css/bootstrap.min.css" |
|||
}); |
|||
context.BundleDefinitions.Insert(1, new BundleDefinition |
|||
{ |
|||
context.BundleDefinitions.Insert(0, new BundleDefinition |
|||
{ |
|||
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/bootstrap/css/bootstrap.min.css" |
|||
}); |
|||
context.BundleDefinitions.Insert(1, new BundleDefinition |
|||
{ |
|||
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/css/all.css" |
|||
}); |
|||
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/css/all.css" |
|||
}); |
|||
|
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/css/flag-icon.css"); |
|||
context.Add("_content/Blazorise/blazorise.css"); |
|||
context.Add("_content/Blazorise.Bootstrap5/blazorise.bootstrap5.css"); |
|||
context.Add("_content/Blazorise.Snackbar/blazorise.snackbar.css"); |
|||
} |
|||
context.Add("_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/css/flag-icon.css"); |
|||
context.Add("_content/Blazorise/blazorise.css"); |
|||
context.Add("_content/Blazorise.Bootstrap5/blazorise.bootstrap5.css"); |
|||
context.Add("_content/Blazorise.Snackbar/blazorise.snackbar.css"); |
|||
} |
|||
} |
|||
|
|||
@ -1,19 +1,18 @@ |
|||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly; |
|||
|
|||
public class AbpWebAssemblyApplicationCreationOptions |
|||
{ |
|||
public class AbpWebAssemblyApplicationCreationOptions |
|||
{ |
|||
public WebAssemblyHostBuilder HostBuilder { get; } |
|||
public WebAssemblyHostBuilder HostBuilder { get; } |
|||
|
|||
public AbpApplicationCreationOptions ApplicationCreationOptions { get; } |
|||
public AbpApplicationCreationOptions ApplicationCreationOptions { get; } |
|||
|
|||
public AbpWebAssemblyApplicationCreationOptions( |
|||
WebAssemblyHostBuilder hostBuilder, |
|||
AbpApplicationCreationOptions applicationCreationOptions) |
|||
{ |
|||
HostBuilder = hostBuilder; |
|||
ApplicationCreationOptions = applicationCreationOptions; |
|||
} |
|||
public AbpWebAssemblyApplicationCreationOptions( |
|||
WebAssemblyHostBuilder hostBuilder, |
|||
AbpApplicationCreationOptions applicationCreationOptions) |
|||
{ |
|||
HostBuilder = hostBuilder; |
|||
ApplicationCreationOptions = applicationCreationOptions; |
|||
} |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly; |
|||
|
|||
public class ApplicationConfigurationCache : ISingletonDependency |
|||
{ |
|||
public class ApplicationConfigurationCache : ISingletonDependency |
|||
{ |
|||
protected ApplicationConfigurationDto Configuration { get; set; } |
|||
protected ApplicationConfigurationDto Configuration { get; set; } |
|||
|
|||
public virtual ApplicationConfigurationDto Get() |
|||
{ |
|||
return Configuration; |
|||
} |
|||
public virtual ApplicationConfigurationDto Get() |
|||
{ |
|||
return Configuration; |
|||
} |
|||
|
|||
public void Set(ApplicationConfigurationDto configuration) |
|||
{ |
|||
Configuration = configuration; |
|||
} |
|||
public void Set(ApplicationConfigurationDto configuration) |
|||
{ |
|||
Configuration = configuration; |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.MultiTenancy; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency |
|||
{ |
|||
public BasicTenantInfo Current { get; set; } |
|||
} |
|||
public BasicTenantInfo Current { get; set; } |
|||
} |
|||
|
|||
@ -1,30 +1,28 @@ |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Alerts |
|||
namespace Volo.Abp.AspNetCore.Components.Alerts; |
|||
|
|||
public class AlertMessage |
|||
{ |
|||
public class AlertMessage |
|||
{ |
|||
[NotNull] |
|||
public string Text |
|||
{ |
|||
get => _text; |
|||
set => _text = Check.NotNullOrWhiteSpace(value, nameof(value)); |
|||
} |
|||
private string _text; |
|||
[NotNull] |
|||
public string Text { |
|||
get => _text; |
|||
set => _text = Check.NotNullOrWhiteSpace(value, nameof(value)); |
|||
} |
|||
private string _text; |
|||
|
|||
public AlertType Type { get; set; } |
|||
public AlertType Type { get; set; } |
|||
|
|||
[CanBeNull] |
|||
public string Title { get; set; } |
|||
[CanBeNull] |
|||
public string Title { get; set; } |
|||
|
|||
public bool Dismissible { get; set; } |
|||
public bool Dismissible { get; set; } |
|||
|
|||
public AlertMessage(AlertType type, [NotNull] string text, string title = null, bool dismissible = true) |
|||
{ |
|||
Type = type; |
|||
Text = Check.NotNullOrWhiteSpace(text, nameof(text)); |
|||
Title = title; |
|||
Dismissible = dismissible; |
|||
} |
|||
public AlertMessage(AlertType type, [NotNull] string text, string title = null, bool dismissible = true) |
|||
{ |
|||
Type = type; |
|||
Text = Check.NotNullOrWhiteSpace(text, nameof(text)); |
|||
Title = title; |
|||
Dismissible = dismissible; |
|||
} |
|||
} |
|||
|
|||
@ -1,32 +1,31 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.DependencyInjection |
|||
namespace Volo.Abp.AspNetCore.Components.DependencyInjection; |
|||
|
|||
public class ServiceProviderComponentActivator : IComponentActivator |
|||
{ |
|||
public class ServiceProviderComponentActivator : IComponentActivator |
|||
public IServiceProvider ServiceProvider { get; } |
|||
|
|||
public ServiceProviderComponentActivator(IServiceProvider serviceProvider) |
|||
{ |
|||
ServiceProvider = serviceProvider; |
|||
} |
|||
|
|||
public IComponent CreateInstance(Type componentType) |
|||
{ |
|||
public IServiceProvider ServiceProvider { get; } |
|||
var instance = ServiceProvider.GetService(componentType); |
|||
|
|||
public ServiceProviderComponentActivator(IServiceProvider serviceProvider) |
|||
if (instance == null) |
|||
{ |
|||
ServiceProvider = serviceProvider; |
|||
instance = Activator.CreateInstance(componentType); |
|||
} |
|||
|
|||
public IComponent CreateInstance(Type componentType) |
|||
if (!(instance is IComponent component)) |
|||
{ |
|||
var instance = ServiceProvider.GetService(componentType); |
|||
|
|||
if (instance == null) |
|||
{ |
|||
instance = Activator.CreateInstance(componentType); |
|||
} |
|||
|
|||
if (!(instance is IComponent component)) |
|||
{ |
|||
throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType)); |
|||
} |
|||
|
|||
return component; |
|||
throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType)); |
|||
} |
|||
|
|||
return component; |
|||
} |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling |
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling; |
|||
|
|||
public interface IUserExceptionInformer |
|||
{ |
|||
public interface IUserExceptionInformer |
|||
{ |
|||
void Inform(UserExceptionInformerContext context); |
|||
|
|||
Task InformAsync(UserExceptionInformerContext context); |
|||
} |
|||
void Inform(UserExceptionInformerContext context); |
|||
|
|||
Task InformAsync(UserExceptionInformerContext context); |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling |
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling; |
|||
|
|||
public class NullUserExceptionInformer : IUserExceptionInformer, ISingletonDependency |
|||
{ |
|||
public class NullUserExceptionInformer : IUserExceptionInformer, ISingletonDependency |
|||
public void Inform(UserExceptionInformerContext context) |
|||
{ |
|||
public void Inform(UserExceptionInformerContext context) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public Task InformAsync(UserExceptionInformerContext context) |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public Task InformAsync(UserExceptionInformerContext context) |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling |
|||
namespace Volo.Abp.AspNetCore.Components.ExceptionHandling; |
|||
|
|||
public class UserExceptionInformerContext |
|||
{ |
|||
public class UserExceptionInformerContext |
|||
{ |
|||
[NotNull] |
|||
public Exception Exception { get; } |
|||
[NotNull] |
|||
public Exception Exception { get; } |
|||
|
|||
public UserExceptionInformerContext(Exception exception) |
|||
{ |
|||
Exception = exception; |
|||
} |
|||
public UserExceptionInformerContext(Exception exception) |
|||
{ |
|||
Exception = exception; |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Messages |
|||
namespace Volo.Abp.AspNetCore.Components.Messages; |
|||
|
|||
public interface IUiMessageService |
|||
{ |
|||
public interface IUiMessageService |
|||
{ |
|||
Task Info(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
Task Info(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task Success(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
Task Success(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task Warn(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
Task Warn(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task Error(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
Task Error(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
|
|||
Task<bool> Confirm(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
} |
|||
Task<bool> Confirm(string message, string title = null, Action<UiMessageOptions> options = null); |
|||
} |
|||
|
|||
@ -1,35 +1,34 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Messages |
|||
namespace Volo.Abp.AspNetCore.Components.Messages; |
|||
|
|||
public class UiMessageEventArgs : EventArgs |
|||
{ |
|||
public class UiMessageEventArgs : EventArgs |
|||
public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options) |
|||
{ |
|||
public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options) |
|||
{ |
|||
MessageType = messageType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
} |
|||
MessageType = messageType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
} |
|||
|
|||
public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options, TaskCompletionSource<bool> callback) |
|||
{ |
|||
MessageType = messageType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
Callback = callback; |
|||
} |
|||
public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options, TaskCompletionSource<bool> callback) |
|||
{ |
|||
MessageType = messageType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
Callback = callback; |
|||
} |
|||
|
|||
public UiMessageType MessageType { get; set; } |
|||
public UiMessageType MessageType { get; set; } |
|||
|
|||
public string Message { get; } |
|||
public string Message { get; } |
|||
|
|||
public string Title { get; } |
|||
public string Title { get; } |
|||
|
|||
public UiMessageOptions Options { get; } |
|||
public UiMessageOptions Options { get; } |
|||
|
|||
public TaskCompletionSource<bool> Callback { get; } |
|||
} |
|||
public TaskCompletionSource<bool> Callback { get; } |
|||
} |
|||
|
|||
@ -1,53 +1,52 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Messages |
|||
namespace Volo.Abp.AspNetCore.Components.Messages; |
|||
|
|||
/// <summary>
|
|||
/// Options to override message dialog appearance.
|
|||
/// </summary>
|
|||
public class UiMessageOptions |
|||
{ |
|||
/// <summary>
|
|||
/// Options to override message dialog appearance.
|
|||
/// </summary>
|
|||
public class UiMessageOptions |
|||
{ |
|||
/// <summary>
|
|||
/// If true, the message dialogue will be centered on the screen.
|
|||
/// </summary>
|
|||
public bool CenterMessage { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// If true, the message dialogue will show the large icon for the current message type.
|
|||
/// </summary>
|
|||
public bool ShowMessageIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Overrides the build-in message icon.
|
|||
/// </summary>
|
|||
public object MessageIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Ok button.
|
|||
/// </summary>
|
|||
public string OkButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Ok button.
|
|||
/// </summary>
|
|||
public object OkButtonIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Confirmation button.
|
|||
/// </summary>
|
|||
public string ConfirmButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Confirmation button.
|
|||
/// </summary>
|
|||
public object ConfirmButtonIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Cancel button.
|
|||
/// </summary>
|
|||
public string CancelButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Cancel button.
|
|||
/// </summary>
|
|||
public object CancelButtonIcon { get; set; } |
|||
} |
|||
/// If true, the message dialogue will be centered on the screen.
|
|||
/// </summary>
|
|||
public bool CenterMessage { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// If true, the message dialogue will show the large icon for the current message type.
|
|||
/// </summary>
|
|||
public bool ShowMessageIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Overrides the build-in message icon.
|
|||
/// </summary>
|
|||
public object MessageIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Ok button.
|
|||
/// </summary>
|
|||
public string OkButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Ok button.
|
|||
/// </summary>
|
|||
public object OkButtonIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Confirmation button.
|
|||
/// </summary>
|
|||
public string ConfirmButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Confirmation button.
|
|||
/// </summary>
|
|||
public object ConfirmButtonIcon { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom text for the Cancel button.
|
|||
/// </summary>
|
|||
public string CancelButtonText { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Custom icon for the Cancel button.
|
|||
/// </summary>
|
|||
public object CancelButtonIcon { get; set; } |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.Messages |
|||
namespace Volo.Abp.AspNetCore.Components.Messages; |
|||
|
|||
/// <summary>
|
|||
/// Defines the possible ui message types with predefined actions.
|
|||
/// </summary>
|
|||
public enum UiMessageType |
|||
{ |
|||
/// <summary>
|
|||
/// Defines the possible ui message types with predefined actions.
|
|||
/// </summary>
|
|||
public enum UiMessageType |
|||
{ |
|||
Info, |
|||
Success, |
|||
Warning, |
|||
Error, |
|||
Confirmation, |
|||
} |
|||
Info, |
|||
Success, |
|||
Warning, |
|||
Error, |
|||
Confirmation, |
|||
} |
|||
|
|||
@ -1,16 +1,15 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Notifications |
|||
namespace Volo.Abp.AspNetCore.Components.Notifications; |
|||
|
|||
public interface IUiNotificationService |
|||
{ |
|||
public interface IUiNotificationService |
|||
{ |
|||
Task Info(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Success(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Warn(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Error(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
} |
|||
Task Info(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Success(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Warn(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
|
|||
Task Error(string message, string title = null, Action<UiNotificationOptions> options = null); |
|||
} |
|||
|
|||
@ -1,23 +1,22 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Notifications |
|||
namespace Volo.Abp.AspNetCore.Components.Notifications; |
|||
|
|||
public class UiNotificationEventArgs : EventArgs |
|||
{ |
|||
public class UiNotificationEventArgs : EventArgs |
|||
public UiNotificationEventArgs(UiNotificationType notificationType, string message, string title, UiNotificationOptions options) |
|||
{ |
|||
public UiNotificationEventArgs(UiNotificationType notificationType, string message, string title, UiNotificationOptions options) |
|||
{ |
|||
NotificationType = notificationType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
} |
|||
NotificationType = notificationType; |
|||
Message = message; |
|||
Title = title; |
|||
Options = options; |
|||
} |
|||
|
|||
public UiNotificationType NotificationType { get; set; } |
|||
public UiNotificationType NotificationType { get; set; } |
|||
|
|||
public string Message { get; } |
|||
public string Message { get; } |
|||
|
|||
public string Title { get; } |
|||
public string Title { get; } |
|||
|
|||
public UiNotificationOptions Options { get; } |
|||
} |
|||
public UiNotificationOptions Options { get; } |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue