fileservice getting and setting xslt file content.

This commit is contained in:
Claus
2016-09-09 13:36:34 +02:00
parent b67855b7a3
commit 3f65ec3318
2 changed files with 30 additions and 0 deletions

View File

@@ -603,6 +603,22 @@ namespace Umbraco.Core.Services
}
}
public Stream GetXsltFileContentStream(string filepath)
{
using (var repository = RepositoryFactory.CreateXsltFileRepository(UowProvider.GetUnitOfWork()))
{
return repository.GetFileContentStream(filepath);
}
}
public void SetXsltFileContent(string filepath, Stream content)
{
using (var repository = RepositoryFactory.CreateXsltFileRepository(UowProvider.GetUnitOfWork()))
{
repository.SetFileContent(filepath, content);
}
}
#region Partial Views
public IEnumerable<string> GetPartialViewSnippetNames(params string[] filterNames)

View File

@@ -282,6 +282,20 @@ namespace Umbraco.Core.Services
/// <param name="content">The content of the script file.</param>
void SetScriptFileContent(string filepath, Stream content);
/// <summary>
/// Gets the content of a XSLT file as a stream.
/// </summary>
/// <param name="filepath">The filesystem path to the XSLT file.</param>
/// <returns>The content of the XSLT file.</returns>
Stream GetXsltFileContentStream(string filepath);
/// <summary>
/// Sets the content of a XSLT file.
/// </summary>
/// <param name="filepath">The filesystem path to the XSLT file.</param>
/// <param name="content">The content of the XSLT file.</param>
void SetXsltFileContent(string filepath, Stream content);
/// <summary>
/// Gets the content of a macro partial view as a stream.
/// </summary>