Inject filesystems into partial repositories
This commit is contained in:
@@ -6,15 +6,9 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
internal class PartialViewMacroRepository : PartialViewRepository
|
||||
{
|
||||
public PartialViewMacroRepository(IUnitOfWork work)
|
||||
: this(work, FileSystemProviderManager.Current.MacroPartialsFileSystem)
|
||||
{
|
||||
}
|
||||
|
||||
public PartialViewMacroRepository(IUnitOfWork work, IFileSystem fileSystem)
|
||||
: base(work, fileSystem)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
protected override PartialViewType ViewType { get { return PartialViewType.PartialViewMacro; } }
|
||||
}
|
||||
|
||||
@@ -10,14 +10,9 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
{
|
||||
internal class PartialViewRepository : FileRepository<string, IPartialView>, IPartialViewRepository
|
||||
{
|
||||
public PartialViewRepository(IUnitOfWork work)
|
||||
: this(work, FileSystemProviderManager.Current.PartialViewsFileSystem)
|
||||
{
|
||||
}
|
||||
|
||||
public PartialViewRepository(IUnitOfWork work, IFileSystem fileSystem) : base(work, fileSystem)
|
||||
{
|
||||
}
|
||||
public PartialViewRepository(IUnitOfWork work, IFileSystem fileSystem)
|
||||
: base(work, fileSystem)
|
||||
{ }
|
||||
|
||||
protected virtual PartialViewType ViewType { get { return PartialViewType.PartialView; } }
|
||||
|
||||
|
||||
@@ -217,12 +217,12 @@ namespace Umbraco.Core.Persistence
|
||||
|
||||
internal virtual IPartialViewRepository CreatePartialViewRepository(IUnitOfWork uow)
|
||||
{
|
||||
return new PartialViewRepository(uow);
|
||||
return new PartialViewRepository(uow, FileSystemProviderManager.Current.PartialViewsFileSystem);
|
||||
}
|
||||
|
||||
internal virtual IPartialViewRepository CreatePartialViewMacroRepository(IUnitOfWork uow)
|
||||
{
|
||||
return new PartialViewMacroRepository(uow);
|
||||
return new PartialViewMacroRepository(uow, FileSystemProviderManager.Current.MacroPartialsFileSystem);
|
||||
}
|
||||
|
||||
public virtual IStylesheetRepository CreateStylesheetRepository(IUnitOfWork uow, IDatabaseUnitOfWork db)
|
||||
|
||||
Reference in New Issue
Block a user