Browse Source

Changed on virtual file provider.

pull/179/head
Halil İbrahim Kalkan 9 years ago
parent
commit
5228cf9aa9
  1. 2
      src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs
  2. BIN
      src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll
  3. 2
      src/Volo.Abp.Account.Web/AbpAccountWebModule.cs
  4. 3
      src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs
  5. 2
      src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs
  6. 2
      src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml
  7. 2
      src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj
  8. 0
      src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/wwwroot/views/shared/_AppLayout.css
  9. 2
      src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs
  10. 16
      src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs
  11. 2
      src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs

2
src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs

@ -36,7 +36,7 @@ namespace AbpDesk.Blogging
options.FileSets.Add(
new EmbeddedFileSet(
"/",
"/wwwroot/",
GetType().Assembly,
"wwwroot" //TODO: This is not tested yet!
)

BIN
src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll

Binary file not shown.

2
src/Volo.Abp.Account.Web/AbpAccountWebModule.cs

@ -37,7 +37,7 @@ namespace Volo.Abp.Account.Web
options.FileSets.Add(
new EmbeddedFileSet(
"/",
"/wwwroot/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.Account.Web.wwwroot"
)

3
src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs

@ -10,7 +10,8 @@ namespace Microsoft.AspNetCore.Builder
new StaticFileOptions
{
FileProvider = new AspNetCoreVirtualFileProvider(
app.ApplicationServices
app.ApplicationServices,
"/wwwroot"
)
}
);

2
src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs

@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
{
options.FileSets.Add(
new EmbeddedFileSet(
"/",
"/wwwroot/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.wwwroot"
)

2
src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml

@ -14,7 +14,7 @@
<vc:abp-style-bundle name="GlobalStyles"></vc:abp-style-bundle>
<link rel="stylesheet" type="text/css" href="~/Views/Shared/_AppLayout.css"/>
<link rel="stylesheet" type="text/css" href="~/views/shared/_AppLayout.css"/>
@RenderSection("styles", false)
</head>

2
src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj

@ -12,7 +12,7 @@
<ItemGroup>
<EmbeddedResource Include="Views\Shared\Components\AbpMenu\Default.cshtml" />
<EmbeddedResource Include="Views\Shared\_AppLayout.cshtml" />
<EmbeddedResource Include="Views\Shared\_AppLayout.css" />
<EmbeddedResource Include="wwwroot\views\shared\_AppLayout.css" />
<EmbeddedResource Include="Views\Shared\_ViewImports.cshtml" />
<EmbeddedResource Include="wwwroot\libs\bootstrap\css\bootstrap.css" />
<EmbeddedResource Include="wwwroot\libs\bootstrap\css\bootstrap.css.map" />

0
src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css → src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/wwwroot/views/shared/_AppLayout.css

2
src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs

@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc
options.FileSets.Add(
new EmbeddedFileSet(
"/",
"/wwwroot/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.AspNetCore.Mvc.wwwroot"
)

16
src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs

@ -1,4 +1,5 @@
using System;
using System.IO;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Options;
@ -13,11 +14,12 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem
private readonly Lazy<IVirtualFileProvider> _virtualFileProvider;
private readonly Lazy<AspNetCoreVirtualFileOptions> _options;
private readonly IObjectAccessor<IServiceProvider> _serviceProviderAccessor;
private readonly string _contentPath;
public AspNetCoreVirtualFileProvider(IServiceProvider serviceProvider)
public AspNetCoreVirtualFileProvider(IServiceProvider serviceProvider, string contentPath = null)
: this(new ObjectAccessor<IServiceProvider>(serviceProvider))
{
_contentPath = contentPath;
}
public AspNetCoreVirtualFileProvider(IObjectAccessor<IServiceProvider> serviceProviderAccessor)
@ -37,6 +39,11 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem
public IFileInfo GetFileInfo(string subpath)
{
if (_contentPath != null)
{
subpath = _contentPath + subpath;
}
//TODO: Ignore files in _options.Value.IgnoredFileExtensions
if (!IsInitialized())
@ -49,6 +56,11 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem
public IDirectoryContents GetDirectoryContents(string subpath)
{
if (_contentPath != null)
{
subpath = _contentPath + subpath;
}
//TODO: Ignore files in _options.Value.IgnoredFileExtensions
if (!IsInitialized())

2
src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs

@ -43,7 +43,7 @@ namespace Volo.Abp.Identity.Web
options.FileSets.Add(
new EmbeddedFileSet(
"/",
"/wwwroot/",
GetType().Assembly,
"Volo.Abp.Identity.Web.wwwroot"
)

Loading…
Cancel
Save