@ -0,0 +1,125 @@ |
|||
# Blazor UI: Layout Hooks |
|||
|
|||
ABP Framework theming system places the page layout into the [theme](Theming.md) NuGet packages. That means the final application doesn't include a layout, so you can't directly change the layout code to customize it. |
|||
|
|||
> If you create a Blazor WASM project, the `index.html` file will be included within the template. You can also customize it to your needs. |
|||
|
|||
You can copy the theme code into your solution. In this case, you are completely free to customize it. However, then you won't be able to get automatic updates of the theme (by upgrading the theme NuGet package). |
|||
|
|||
The **Layout Hook System** allows you to **add code** at some specific parts of the layout. All layouts of all themes should implement these hooks. Finally, you can add a **razor component** into a hook point. |
|||
|
|||
## Example: Add a Simple Announcement Alert |
|||
|
|||
Assume that you need to add a simple banner to the layout (that will be available for all the pages) to make an announcement about your new product. First, **create a razor component** in your project: |
|||
|
|||
 |
|||
|
|||
**AnnouncementComponent.razor.cs** |
|||
|
|||
```csharp |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Components; |
|||
using Microsoft.JSInterop; |
|||
|
|||
namespace Acme.BookStore.Blazor.Components; |
|||
|
|||
public partial class AnnouncementComponent : ComponentBase |
|||
{ |
|||
private const string AnnouncementLocalStorageKey = "product-announcement-status"; |
|||
|
|||
[Inject] |
|||
public IJSRuntime JsRuntime { get; set; } |
|||
|
|||
public bool ShowBanner { get; set; } |
|||
|
|||
protected override async Task OnInitializedAsync() |
|||
{ |
|||
ShowBanner = await ShowAnnouncementBannerAsync(); |
|||
} |
|||
|
|||
private async Task<bool> ShowAnnouncementBannerAsync() |
|||
{ |
|||
var announcementLocalStorageValue = await JsRuntime.InvokeAsync<string>("localStorage.getItem", AnnouncementLocalStorageKey); |
|||
|
|||
return announcementLocalStorageValue != null && |
|||
bool.TryParse(announcementLocalStorageValue, out var showAnnouncementBanner) && showAnnouncementBanner; |
|||
} |
|||
|
|||
private async Task HideAnnouncementBannerAsync() |
|||
{ |
|||
await JsRuntime.InvokeVoidAsync("localStorage.setItem", AnnouncementLocalStorageKey, true); |
|||
ShowBanner = false; |
|||
StateHasChanged(); |
|||
} |
|||
} |
|||
``` |
|||
|
|||
**AnnouncementComponent.razor** |
|||
|
|||
```html |
|||
@if(ShowBanner) |
|||
{ |
|||
<div class="alert alert-info"> |
|||
A brand new product is in sale. Click <a href="#">here</a> to learn more. |
|||
<button @onclick="async () => { await HideAnnouncementBannerAsync(); }">Hide</button> |
|||
</div> |
|||
} |
|||
``` |
|||
|
|||
Then, you can add this component to any of the hook points in the `ConfigureServices` of your module class: |
|||
|
|||
```csharp |
|||
Configure<AbpLayoutHookOptions>(options => |
|||
{ |
|||
options.Add( |
|||
LayoutHooks.Body.Last, //The hook name |
|||
typeof(AnnouncementComponent) //The component to add |
|||
); |
|||
}); |
|||
``` |
|||
|
|||
Now, the `AnnouncementComponent` will be rendered in the `body` of the page as the last item. |
|||
|
|||
### Specifying the Layout |
|||
|
|||
The configuration above adds the `AnnouncementComponent` to all layouts. You may want to only add it to a specific layout: |
|||
|
|||
````csharp |
|||
Configure<AbpLayoutHookOptions>(options => |
|||
{ |
|||
options.Add( |
|||
LayoutHooks.Body.Last, |
|||
typeof(AnnouncementComponent), |
|||
layout: StandardLayouts.Application //Set the layout to add |
|||
); |
|||
}); |
|||
```` |
|||
|
|||
See the *Layouts* section below to learn more about the layout system. |
|||
|
|||
## Layout Hook Points |
|||
|
|||
There are some pre-defined layout hook points. The standard hook points are: |
|||
|
|||
* `LayoutHooks.Body.First`: Used to add a component as the first item in the HTML body tag. |
|||
* `LayoutHooks.Body.Last`: Used to add a component as the last item in the HTML body tag. |
|||
|
|||
> You (or the modules you are using) can add **multiple items to the same hook point**. All of them will be added to the layout in the order they were added. |
|||
|
|||
## Layouts |
|||
|
|||
The layout system allows themes to define the standard named layouts and allows any page to select a proper layout for its purpose. There is one pre-defined layout: |
|||
|
|||
* "**Application**": The main (and the default) layout for an application. It typically contains a header, menu (sidebar), footer, toolbar... etc. |
|||
|
|||
This layout is defined in the `StandardLayouts` class as constants. You can definitely create your own layouts, but this layout is the standard layout and it's implemented by all the themes out of the box. |
|||
|
|||
> If you don't specify the layout, your razor component will be rendered in all of the layouts. |
|||
|
|||
### Layout Location |
|||
|
|||
You can find the `MainLayout.razor` [here](https://github.com/abpframework/abp/blob/dev/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/MainLayout.razor) for the basic theme. You can take it as a reference to build your own layouts or you can override it, if necessary. |
|||
|
|||
## See Also |
|||
|
|||
* [Customization / Overriding Components](Customization-Overriding-Components.md) |
|||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 65 KiB |
@ -0,0 +1,14 @@ |
|||
namespace Volo.Abp.DistributedLocking; |
|||
|
|||
public class AbpDistributedLockOptions |
|||
{ |
|||
/// <summary>
|
|||
/// DistributedLock key prefix.
|
|||
/// </summary>
|
|||
public string KeyPrefix { get; set; } |
|||
|
|||
public AbpDistributedLockOptions() |
|||
{ |
|||
KeyPrefix = ""; |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.DistributedLocking; |
|||
|
|||
public class DistributedLockKeyNormalizer : IDistributedLockKeyNormalizer, ITransientDependency |
|||
{ |
|||
protected AbpDistributedLockOptions Options { get; } |
|||
|
|||
public DistributedLockKeyNormalizer(IOptions<AbpDistributedLockOptions> options) |
|||
{ |
|||
Options = options.Value; |
|||
} |
|||
|
|||
public virtual string NormalizeKey(string name) |
|||
{ |
|||
return $"{Options.KeyPrefix}{name}"; |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
namespace Volo.Abp.DistributedLocking; |
|||
|
|||
public interface IDistributedLockKeyNormalizer |
|||
{ |
|||
string NormalizeKey(string name); |
|||
|
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.Account; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class AccountInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.AuditLogging; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class AuditLoggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.AuditLogging.EntityFrameworkCore", |
|||
"ConfigureAuditLogging" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.BackgroundJobs; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class BackgroundJobsInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.BackgroundJobs.EntityFrameworkCore", |
|||
"ConfigureBackgroundJobs" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.BasicTheme; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class BasicThemeInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.BlobStoring.Database; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class BlobStoringDatabaseInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.BlobStoring.Database.EntityFrameworkCore", |
|||
"ConfigureBlobStoring" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Blogging; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class BloggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.CmsKit; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class BlobStoringDatabaseInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.CmsKit.EntityFrameworkCore", |
|||
"ConfigureCmsKit" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Docs; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class DocsInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.FeatureManagement; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class FeatureManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.FeatureManagement.EntityFrameworkCore", |
|||
"ConfigureFeatureManagement" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.Identity |
|||
{ |
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class IdentityInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.Identity.EntityFrameworkCore", |
|||
"ConfigureIdentity" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class IdentityServerInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.IdentityServer.EntityFrameworkCore", |
|||
"ConfigureIdentityServer" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.OpenIddict; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class OpenIddictInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,10 +1,11 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Permissions": "权限", |
|||
"OnlyProviderPermissons": "只有这个提供商", |
|||
"All": "所有", |
|||
"SelectAllInAllTabs": "授予所有权限", |
|||
"SelectAllInThisTab": "全选" |
|||
} |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Permissions": "权限", |
|||
"OnlyProviderPermissons": "只有这个提供商", |
|||
"All": "所有", |
|||
"SelectAllInAllTabs": "授予所有权限", |
|||
"SelectAllInThisTab": "全选", |
|||
"SaveWithoutAnyPermissionsWarningMessage": "你确定要保存没有任何权限吗?" |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.PermissionManagement; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class PermissionManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.PermissionManagement.EntityFrameworkCore", |
|||
"ConfigurePermissionManagement" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.SettingManagement; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class SettingManagementInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.SettingManagement.EntityFrameworkCore", |
|||
"ConfigureSettingManagement" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.TenantManagement; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class AuditLoggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.TenantManagement.EntityFrameworkCore", |
|||
"ConfigureTenantManagement" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.Users; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class UsersInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
context.AddEfCoreConfigurationMethodDeclaration( |
|||
new EfCoreConfigurationMethodDeclaration( |
|||
"Volo.Abp.Users.EntityFrameworkCore", |
|||
"ConfigureAbpUser" |
|||
) |
|||
); |
|||
|
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Studio.ModuleInstalling; |
|||
|
|||
namespace Volo.Abp.VirtualFileExplorer; |
|||
|
|||
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] |
|||
[ExposeServices(typeof(IModuleInstallingPipelineBuilder))] |
|||
public class VirtualFileExplorerInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency |
|||
{ |
|||
public async Task<ModuleInstallingPipeline> BuildAsync(ModuleInstallingContext context) |
|||
{ |
|||
return GetBasePipeline(context); |
|||
} |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
{ |
|||
"folders": { |
|||
"items": { |
|||
"src": {} |
|||
} |
|||
}, |
|||
"packages": { |
|||
"Volo.Abp.Studio.Analyzing.Abstractions": { |
|||
"path": "src/Volo.Abp.Studio.Analyzing.Abstractions/Volo.Abp.Studio.Analyzing.Abstractions.abppkg.json", |
|||
"folder": "src" |
|||
}, |
|||
"Volo.Abp.Studio.Domain.CommonServices": { |
|||
"path": "src/Volo.Abp.Studio.Domain.CommonServices/Volo.Abp.Studio.Domain.CommonServices.abppkg.json", |
|||
"folder": "src" |
|||
}, |
|||
"Volo.Abp.Studio.Domain.Shared": { |
|||
"path": "src/Volo.Abp.Studio.Domain.Shared/Volo.Abp.Studio.Domain.Shared.abppkg.json", |
|||
"folder": "src" |
|||
}, |
|||
"Volo.Abp.Studio.ModuleInstaller": { |
|||
"path": "src/Volo.Abp.Studio.ModuleInstaller/Volo.Abp.Studio.ModuleInstaller.abppkg.json", |
|||
"folder": "src" |
|||
}, |
|||
"Volo.Abp.Studio.ModuleInstaller.Abstractions": { |
|||
"path": "src/Volo.Abp.Studio.ModuleInstaller.Abstractions/Volo.Abp.Studio.ModuleInstaller.Abstractions.abppkg.json", |
|||
"folder": "src" |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"modules": { |
|||
"Volo.Abp.Studio.Open": { |
|||
"path": "Volo.Abp.Studio.Open.abpmdl.json" |
|||
} |
|||
} |
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{344A1096-CC05-42D1-BDDB-E254C27508A9}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Analyzing.Abstractions", "src\Volo.Abp.Studio.Analyzing.Abstractions\Volo.Abp.Studio.Analyzing.Abstractions.csproj", "{2271296E-33FD-46BE-97FD-9938193CB7D1}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Domain.CommonServices", "src\Volo.Abp.Studio.Domain.CommonServices\Volo.Abp.Studio.Domain.CommonServices.csproj", "{1C86021F-E522-41A1-AC3F-01B0E474D75E}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.Domain.Shared", "src\Volo.Abp.Studio.Domain.Shared\Volo.Abp.Studio.Domain.Shared.csproj", "{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.ModuleInstaller", "src\Volo.Abp.Studio.ModuleInstaller\Volo.Abp.Studio.ModuleInstaller.csproj", "{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Studio.ModuleInstaller.Abstractions", "src\Volo.Abp.Studio.ModuleInstaller.Abstractions\Volo.Abp.Studio.ModuleInstaller.Abstractions.csproj", "{99679BF9-B888-4814-8E85-F751984CAFF8}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{2271296E-33FD-46BE-97FD-9938193CB7D1}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1C86021F-E522-41A1-AC3F-01B0E474D75E}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{99679BF9-B888-4814-8E85-F751984CAFF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{99679BF9-B888-4814-8E85-F751984CAFF8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{99679BF9-B888-4814-8E85-F751984CAFF8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{99679BF9-B888-4814-8E85-F751984CAFF8}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(NestedProjects) = preSolution |
|||
{2271296E-33FD-46BE-97FD-9938193CB7D1} = {344A1096-CC05-42D1-BDDB-E254C27508A9} |
|||
{1C86021F-E522-41A1-AC3F-01B0E474D75E} = {344A1096-CC05-42D1-BDDB-E254C27508A9} |
|||
{28132E4E-FFB9-45C4-99AD-1BCA04B3E597} = {344A1096-CC05-42D1-BDDB-E254C27508A9} |
|||
{4FA11334-D727-4C14-9D71-1DB46AC3BE9C} = {344A1096-CC05-42D1-BDDB-E254C27508A9} |
|||
{99679BF9-B888-4814-8E85-F751984CAFF8} = {344A1096-CC05-42D1-BDDB-E254C27508A9} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -1 +0,0 @@ |
|||
{} |
|||
@ -1,14 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.Core\Volo.Abp.Core.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,8 +0,0 @@ |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing; |
|||
|
|||
public class AbpStudioAnalyzingAbstractionsModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing.Models.Application; |
|||
|
|||
[PackageContentItemName(ContentTypeName)] |
|||
public class ApplicationServiceModel : PackageContentItemModel |
|||
{ |
|||
public const string ContentTypeName = "applicationService"; |
|||
|
|||
public string Namespace { get; set; } |
|||
|
|||
public string Summary { get; set; } |
|||
|
|||
public List<string> ImplementingInterfaces { get; set; } |
|||
|
|||
public ApplicationServiceModel([NotNull] string name) : base(name) |
|||
{ |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing.Models.Authorization; |
|||
|
|||
[PackageContentItemName(ContentTypeName)] |
|||
public class PermissionModel : PackageContentItemModel |
|||
{ |
|||
public const string ContentTypeName = "permission"; |
|||
|
|||
public string DisplayName { get; } |
|||
|
|||
public bool IsEnabled { get; } |
|||
|
|||
public PermissionModel( |
|||
[NotNull] string name, |
|||
string displayName, |
|||
bool isEnabled) |
|||
: base(name) |
|||
{ |
|||
DisplayName = displayName; |
|||
IsEnabled = isEnabled; |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
|||
|
|||
[PackageContentItemName(ContentTypeName)] |
|||
public class DatabaseCollectionModel : PackageContentItemModel |
|||
{ |
|||
public const string ContentTypeName = "databaseCollection"; |
|||
|
|||
public string EntityFullName { get; private set; } |
|||
|
|||
public DatabaseCollectionModel([NotNull] string name, string entityFullName) : base(name) |
|||
{ |
|||
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
|||
|
|||
[PackageContentItemName(ContentTypeName)] |
|||
public class DatabaseTableModel : PackageContentItemModel |
|||
{ |
|||
public const string ContentTypeName = "databaseTable"; |
|||
|
|||
public string EntityFullName { get; private set; } |
|||
|
|||
public DatabaseTableModel([NotNull] string name, string entityFullName) : base(name) |
|||
{ |
|||
EntityFullName = Check.NotNullOrWhiteSpace(entityFullName, nameof(entityFullName)); |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
|||
|
|||
[PackageContentItemName(ContentTypeName)] |
|||
public class EfCoreDbContextModel : PackageContentItemModel, IDbContextModel |
|||
{ |
|||
public const string ContentTypeName = "efCoreDbContext"; |
|||
|
|||
public string Namespace { get; private set; } |
|||
|
|||
public string ConnectionStringName { get; set; } |
|||
|
|||
public List<DatabaseTableModel> DatabaseTables { get; set; } |
|||
|
|||
public EfCoreDbContextModel( |
|||
[NotNull] string name, |
|||
[NotNull] string @namespace |
|||
) : base(name) |
|||
{ |
|||
Namespace = Check.NotNullOrWhiteSpace(@namespace, nameof(@namespace)); |
|||
} |
|||
} |
|||
@ -1,6 +0,0 @@ |
|||
namespace Volo.Abp.Studio.Analyzing.Models.Database; |
|||
|
|||
public interface IDbContextModel |
|||
{ |
|||
string ConnectionStringName { get; set; } |
|||
} |
|||