fileservice getting and setting xslt file content.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user