2015-02-09 17:37:21 +11:00
|
|
|
using System;
|
2012-11-06 10:47:14 -01:00
|
|
|
using System.Collections.Generic;
|
2015-11-30 16:39:27 +01:00
|
|
|
using System.IO;
|
2012-10-24 11:29:51 -02:00
|
|
|
using Umbraco.Core.Models;
|
|
|
|
|
|
2012-11-06 10:47:14 -01:00
|
|
|
namespace Umbraco.Core.Services
|
2012-10-24 11:29:51 -02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the File Service, which is an easy access to operations involving <see cref="IFile"/> objects like Scripts, Stylesheets and Templates
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IFileService : IService
|
|
|
|
|
{
|
2015-01-09 18:39:44 +11:00
|
|
|
IEnumerable<string> GetPartialViewSnippetNames(params string[] filterNames);
|
2017-02-07 10:55:38 +01:00
|
|
|
void CreatePartialViewFolder(string folderPath);
|
|
|
|
|
void CreatePartialViewMacroFolder(string folderPath);
|
2015-01-09 18:39:44 +11:00
|
|
|
void DeletePartialViewFolder(string folderPath);
|
|
|
|
|
void DeletePartialViewMacroFolder(string folderPath);
|
|
|
|
|
IPartialView GetPartialView(string path);
|
|
|
|
|
IPartialView GetPartialViewMacro(string path);
|
2017-07-04 14:28:15 +02:00
|
|
|
[Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")]
|
|
|
|
|
IPartialView GetMacroScript(string path);
|
|
|
|
|
[Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")]
|
|
|
|
|
IUserControl GetUserControl(string path);
|
2016-09-09 13:28:30 +02:00
|
|
|
IEnumerable<IPartialView> GetPartialViewMacros(params string[] names);
|
2016-09-09 13:33:14 +02:00
|
|
|
IXsltFile GetXsltFile(string path);
|
|
|
|
|
IEnumerable<IXsltFile> GetXsltFiles(params string[] names);
|
2015-01-09 18:39:44 +11:00
|
|
|
Attempt<IPartialView> CreatePartialView(IPartialView partialView, string snippetName = null, int userId = 0);
|
|
|
|
|
Attempt<IPartialView> CreatePartialViewMacro(IPartialView partialView, string snippetName = null, int userId = 0);
|
|
|
|
|
bool DeletePartialView(string path, int userId = 0);
|
|
|
|
|
bool DeletePartialViewMacro(string path, int userId = 0);
|
|
|
|
|
Attempt<IPartialView> SavePartialView(IPartialView partialView, int userId = 0);
|
|
|
|
|
Attempt<IPartialView> SavePartialViewMacro(IPartialView partialView, int userId = 0);
|
2015-01-14 12:09:30 +11:00
|
|
|
bool ValidatePartialView(PartialView partialView);
|
2015-09-08 17:48:26 +02:00
|
|
|
bool ValidatePartialViewMacro(PartialView partialView);
|
2015-01-09 18:39:44 +11:00
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a list of all <see cref="Stylesheet"/> objects
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>An enumerable list of <see cref="Stylesheet"/> objects</returns>
|
|
|
|
|
IEnumerable<Stylesheet> GetStylesheets(params string[] names);
|
2015-01-15 11:49:32 +11:00
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a <see cref="Stylesheet"/> object by its name
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">Name of the stylesheet incl. extension</param>
|
|
|
|
|
/// <returns>A <see cref="Stylesheet"/> object</returns>
|
|
|
|
|
Stylesheet GetStylesheetByName(string name);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves a <see cref="Stylesheet"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="stylesheet"><see cref="Stylesheet"/> to save</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user saving the stylesheet</param>
|
2013-01-25 08:58:21 -01:00
|
|
|
void SaveStylesheet(Stylesheet stylesheet, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes a stylesheet by its name
|
|
|
|
|
/// </summary>
|
Updates PartialView & PartialViewMacros models/services/repositories, streamlines their operations, fixes up other underlying problems with the FileRepository, fixes tree syncing for partial views, partial view macros and scripts, fixes scripts being created in folders, allows partial views and partial view macros to be managed and created in folders, fixes FileUnitOfWork to use a queue, publicizes some internal test classes, fixes tree syncing when dealing with invariant case, adds correct validation to the create dialogs of scripts and partial views (and partial view macros)
2014-10-22 16:44:45 +10:00
|
|
|
/// <param name="path">Name incl. extension of the Stylesheet to delete</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user deleting the stylesheet</param>
|
Updates PartialView & PartialViewMacros models/services/repositories, streamlines their operations, fixes up other underlying problems with the FileRepository, fixes tree syncing for partial views, partial view macros and scripts, fixes scripts being created in folders, allows partial views and partial view macros to be managed and created in folders, fixes FileUnitOfWork to use a queue, publicizes some internal test classes, fixes tree syncing when dealing with invariant case, adds correct validation to the create dialogs of scripts and partial views (and partial view macros)
2014-10-22 16:44:45 +10:00
|
|
|
void DeleteStylesheet(string path, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Validates a <see cref="Stylesheet"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="stylesheet"><see cref="Stylesheet"/> to validate</param>
|
|
|
|
|
/// <returns>True if Stylesheet is valid, otherwise false</returns>
|
|
|
|
|
bool ValidateStylesheet(Stylesheet stylesheet);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a list of all <see cref="Script"/> objects
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>An enumerable list of <see cref="Script"/> objects</returns>
|
|
|
|
|
IEnumerable<Script> GetScripts(params string[] names);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a <see cref="Script"/> object by its name
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">Name of the script incl. extension</param>
|
|
|
|
|
/// <returns>A <see cref="Script"/> object</returns>
|
|
|
|
|
Script GetScriptByName(string name);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves a <see cref="Script"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="script"><see cref="Script"/> to save</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user saving the script</param>
|
2013-01-25 08:58:21 -01:00
|
|
|
void SaveScript(Script script, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes a script by its name
|
|
|
|
|
/// </summary>
|
Updates PartialView & PartialViewMacros models/services/repositories, streamlines their operations, fixes up other underlying problems with the FileRepository, fixes tree syncing for partial views, partial view macros and scripts, fixes scripts being created in folders, allows partial views and partial view macros to be managed and created in folders, fixes FileUnitOfWork to use a queue, publicizes some internal test classes, fixes tree syncing when dealing with invariant case, adds correct validation to the create dialogs of scripts and partial views (and partial view macros)
2014-10-22 16:44:45 +10:00
|
|
|
/// <param name="path">Name incl. extension of the Script to delete</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user deleting the script</param>
|
Updates PartialView & PartialViewMacros models/services/repositories, streamlines their operations, fixes up other underlying problems with the FileRepository, fixes tree syncing for partial views, partial view macros and scripts, fixes scripts being created in folders, allows partial views and partial view macros to be managed and created in folders, fixes FileUnitOfWork to use a queue, publicizes some internal test classes, fixes tree syncing when dealing with invariant case, adds correct validation to the create dialogs of scripts and partial views (and partial view macros)
2014-10-22 16:44:45 +10:00
|
|
|
void DeleteScript(string path, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Validates a <see cref="Script"/>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="script"><see cref="Script"/> to validate</param>
|
|
|
|
|
/// <returns>True if Script is valid, otherwise false</returns>
|
|
|
|
|
bool ValidateScript(Script script);
|
|
|
|
|
|
2014-01-09 18:08:13 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a folder for scripts
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="folderPath"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
void CreateScriptFolder(string folderPath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes a folder for scripts
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="folderPath"></param>
|
|
|
|
|
void DeleteScriptFolder(string folderPath);
|
|
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// Gets a list of all <see cref="ITemplate"/> objects
|
2012-10-24 11:29:51 -02:00
|
|
|
/// </summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// <returns>An enumerable list of <see cref="ITemplate"/> objects</returns>
|
|
|
|
|
IEnumerable<ITemplate> GetTemplates(params string[] aliases);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
2014-11-20 19:51:42 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a list of all <see cref="ITemplate"/> objects
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>An enumerable list of <see cref="ITemplate"/> objects</returns>
|
|
|
|
|
IEnumerable<ITemplate> GetTemplates(int masterTemplateId);
|
|
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
2015-11-03 14:07:05 +01:00
|
|
|
/// Gets a <see cref="ITemplate"/> object by its alias.
|
2012-10-24 11:29:51 -02:00
|
|
|
/// </summary>
|
2015-11-03 14:07:05 +01:00
|
|
|
/// <param name="alias">The alias of the template.</param>
|
|
|
|
|
/// <returns>The <see cref="ITemplate"/> object matching the alias, or null.</returns>
|
2012-12-12 15:17:48 -01:00
|
|
|
ITemplate GetTemplate(string alias);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2015-11-03 14:07:05 +01:00
|
|
|
/// Gets a <see cref="ITemplate"/> object by its identifier.
|
2012-12-12 15:17:48 -01:00
|
|
|
/// </summary>
|
2015-11-03 14:07:05 +01:00
|
|
|
/// <param name="id">The identifer of the template.</param>
|
|
|
|
|
/// <returns>The <see cref="ITemplate"/> object matching the identifier, or null.</returns>
|
2012-12-12 15:17:48 -01:00
|
|
|
ITemplate GetTemplate(int id);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
2015-11-03 14:07:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a <see cref="ITemplate"/> object by its guid identifier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The guid identifier of the template.</param>
|
|
|
|
|
/// <returns>The <see cref="ITemplate"/> object matching the identifier, or null.</returns>
|
|
|
|
|
ITemplate GetTemplate(Guid id);
|
|
|
|
|
|
2013-12-16 18:10:44 +11:00
|
|
|
/// <summary>
|
2015-08-05 11:50:20 +02:00
|
|
|
/// Gets the template descendants
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="alias"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IEnumerable<ITemplate> GetTemplateDescendants(string alias);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the template descendants
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="masterTemplateId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IEnumerable<ITemplate> GetTemplateDescendants(int masterTemplateId);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the template children
|
2013-12-16 18:10:44 +11:00
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="alias"></param>
|
|
|
|
|
/// <returns></returns>
|
2015-08-05 11:50:20 +02:00
|
|
|
IEnumerable<ITemplate> GetTemplateChildren(string alias);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the template children
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="masterTemplateId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IEnumerable<ITemplate> GetTemplateChildren(int masterTemplateId);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns a template as a template node which can be traversed (parent, children)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="alias"></param>
|
|
|
|
|
/// <returns></returns>
|
2013-12-16 18:10:44 +11:00
|
|
|
TemplateNode GetTemplateNode(string alias);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Given a template node in a tree, this will find the template node with the given alias if it is found in the hierarchy, otherwise null
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="anyNode"></param>
|
|
|
|
|
/// <param name="alias"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias);
|
|
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// Saves a <see cref="ITemplate"/>
|
2012-10-24 11:29:51 -02:00
|
|
|
/// </summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// <param name="template"><see cref="ITemplate"/> to save</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user saving the template</param>
|
2013-01-25 08:58:21 -01:00
|
|
|
void SaveTemplate(ITemplate template, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
2016-01-19 21:38:11 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a template for a content type
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="contentTypeAlias"></param>
|
|
|
|
|
/// <param name="contentTypeName"></param>
|
|
|
|
|
/// <param name="userId"></param>
|
|
|
|
|
/// <returns>
|
|
|
|
|
/// The template created
|
|
|
|
|
/// </returns>
|
|
|
|
|
Attempt<OperationStatus<ITemplate, OperationStatusType>> CreateTemplateForContentType(string contentTypeAlias, string contentTypeName, int userId = 0);
|
|
|
|
|
|
2014-11-25 18:48:19 +11:00
|
|
|
ITemplate CreateTemplateWithIdentity(string name, string content, ITemplate masterTemplate = null, int userId = 0);
|
|
|
|
|
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes a template by its alias
|
|
|
|
|
/// </summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// <param name="alias">Alias of the <see cref="ITemplate"/> to delete</param>
|
2012-12-10 13:49:20 -01:00
|
|
|
/// <param name="userId">Optional id of the user deleting the template</param>
|
2013-01-25 08:58:21 -01:00
|
|
|
void DeleteTemplate(string alias, int userId = 0);
|
2012-10-24 11:29:51 -02:00
|
|
|
|
|
|
|
|
/// <summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// Validates a <see cref="ITemplate"/>
|
2012-10-24 11:29:51 -02:00
|
|
|
/// </summary>
|
2012-11-11 12:20:14 -01:00
|
|
|
/// <param name="template"><see cref="ITemplate"/> to validate</param>
|
2012-10-24 11:29:51 -02:00
|
|
|
/// <returns>True if Script is valid, otherwise false</returns>
|
2012-11-11 12:20:14 -01:00
|
|
|
bool ValidateTemplate(ITemplate template);
|
2013-03-20 20:31:44 -01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves a collection of <see cref="Template"/> objects
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="templates">List of <see cref="Template"/> to save</param>
|
|
|
|
|
/// <param name="userId">Optional id of the user</param>
|
|
|
|
|
void SaveTemplate(IEnumerable<ITemplate> templates, int userId = 0);
|
2015-01-14 12:09:30 +11:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This checks what the default rendering engine is set in config but then also ensures that there isn't already
|
|
|
|
|
/// a template that exists in the opposite rendering engine's template folder, then returns the appropriate
|
|
|
|
|
/// rendering engine to use.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// The reason this is required is because for example, if you have a master page file already existing under ~/masterpages/Blah.aspx
|
|
|
|
|
/// and then you go to create a template in the tree called Blah and the default rendering engine is MVC, it will create a Blah.cshtml
|
|
|
|
|
/// empty template in ~/Views. This means every page that is using Blah will go to MVC and render an empty page.
|
|
|
|
|
/// This is mostly related to installing packages since packages install file templates to the file system and then create the
|
|
|
|
|
/// templates in business logic. Without this, it could cause the wrong rendering engine to be used for a package.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
RenderingEngine DetermineTemplateRenderingEngine(ITemplate template);
|
2015-11-30 16:39:27 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a template as a stream.
|
|
|
|
|
/// </summary>
|
2015-12-08 12:53:11 +01:00
|
|
|
/// <param name="filepath">The filesystem path to the template.</param>
|
2015-11-30 16:39:27 +01:00
|
|
|
/// <returns>The content of the template.</returns>
|
2016-09-09 09:26:29 +02:00
|
|
|
Stream GetTemplateFileContentStream(string filepath);
|
2015-12-08 12:53:11 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a template.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the template.</param>
|
|
|
|
|
/// <param name="content">The content of the template.</param>
|
2016-04-15 13:25:11 +02:00
|
|
|
void SetTemplateFileContent(string filepath, Stream content);
|
2016-09-09 09:26:29 +02:00
|
|
|
|
2017-01-09 17:49:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a template.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the template.</param>
|
|
|
|
|
/// <returns>The size of the template.</returns>
|
|
|
|
|
long GetTemplateFileSize(string filepath);
|
|
|
|
|
|
2017-07-06 10:44:51 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a macroscript as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macroscript.</param>
|
|
|
|
|
/// <returns>The content of the macroscript.</returns>
|
|
|
|
|
Stream GetMacroScriptFileContentStream(string filepath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a macroscript.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macroscript.</param>
|
|
|
|
|
/// <param name="content">The content of the macroscript.</param>
|
|
|
|
|
void SetMacroScriptFileContent(string filepath, Stream content);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a macroscript.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macroscript.</param>
|
|
|
|
|
/// <returns>The size of the macroscript.</returns>
|
|
|
|
|
long GetMacroScriptFileSize(string filepath);
|
|
|
|
|
|
2016-09-09 09:26:29 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a stylesheet as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the stylesheet.</param>
|
|
|
|
|
/// <returns>The content of the stylesheet.</returns>
|
|
|
|
|
Stream GetStylesheetFileContentStream(string filepath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a stylesheet.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the stylesheet.</param>
|
|
|
|
|
/// <param name="content">The content of the stylesheet.</param>
|
|
|
|
|
void SetStylesheetFileContent(string filepath, Stream content);
|
|
|
|
|
|
2017-01-09 17:49:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a stylesheet.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the stylesheet.</param>
|
|
|
|
|
/// <returns>The size of the stylesheet.</returns>
|
|
|
|
|
long GetStylesheetFileSize(string filepath);
|
|
|
|
|
|
2016-09-09 09:26:29 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a script file as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the script.</param>
|
|
|
|
|
/// <returns>The content of the script file.</returns>
|
2016-09-09 11:09:42 +02:00
|
|
|
Stream GetScriptFileContentStream(string filepath);
|
2016-09-09 09:26:29 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a script file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the script.</param>
|
|
|
|
|
/// <param name="content">The content of the script file.</param>
|
|
|
|
|
void SetScriptFileContent(string filepath, Stream content);
|
|
|
|
|
|
2017-01-09 17:49:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a script file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the script file.</param>
|
|
|
|
|
/// <returns>The size of the script file.</returns>
|
|
|
|
|
long GetScriptFileSize(string filepath);
|
|
|
|
|
|
2017-07-06 10:44:51 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a usercontrol as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the usercontrol.</param>
|
|
|
|
|
/// <returns>The content of the usercontrol.</returns>
|
|
|
|
|
Stream GetUserControlFileContentStream(string filepath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a usercontrol.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the usercontrol.</param>
|
|
|
|
|
/// <param name="content">The content of the usercontrol.</param>
|
|
|
|
|
void SetUserControlFileContent(string filepath, Stream content);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a usercontrol.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the usercontrol.</param>
|
|
|
|
|
/// <returns>The size of the usercontrol.</returns>
|
|
|
|
|
long GetUserControlFileSize(string filepath);
|
|
|
|
|
|
2016-09-09 13:36:34 +02:00
|
|
|
/// <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);
|
|
|
|
|
|
2017-01-09 17:49:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a XSLT file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the XSLT file.</param>
|
|
|
|
|
/// <returns>The size of the XSLT file.</returns>
|
|
|
|
|
long GetXsltFileSize(string filepath);
|
|
|
|
|
|
2016-09-09 13:28:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a macro partial view as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macro partial view.</param>
|
|
|
|
|
/// <returns>The content of the macro partial view.</returns>
|
|
|
|
|
Stream GetPartialViewMacroFileContentStream(string filepath);
|
|
|
|
|
|
2017-02-01 12:33:20 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a macro partial view snippet as a string
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="snippetName">The name of the snippet</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
string GetPartialViewMacroSnippetContent(string snippetName);
|
|
|
|
|
|
2016-09-09 13:28:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a macro partial view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macro partial view.</param>
|
|
|
|
|
/// <param name="content">The content of the macro partial view.</param>
|
|
|
|
|
void SetPartialViewMacroFileContent(string filepath, Stream content);
|
2016-09-09 13:31:43 +02:00
|
|
|
|
2017-01-09 17:49:12 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a macro partial view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the macro partial view.</param>
|
|
|
|
|
/// <returns>The size of the macro partial view.</returns>
|
|
|
|
|
long GetPartialViewMacroFileSize(string filepath);
|
|
|
|
|
|
2016-09-09 13:31:43 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a partial view as a stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the partial view.</param>
|
|
|
|
|
/// <returns>The content of the partial view.</returns>
|
|
|
|
|
Stream GetPartialViewFileContentStream(string filepath);
|
|
|
|
|
|
2017-02-01 12:33:20 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a partial view snippet as a string.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="snippetName">The name of the snippet</param>
|
|
|
|
|
/// <returns>The content of the partial view.</returns>
|
|
|
|
|
string GetPartialViewSnippetContent(string snippetName);
|
|
|
|
|
|
2016-09-09 13:31:43 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Sets the content of a partial view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the partial view.</param>
|
|
|
|
|
/// <param name="content">The content of the partial view.</param>
|
|
|
|
|
void SetPartialViewFileContent(string filepath, Stream content);
|
2017-01-09 17:49:12 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the size of a partial view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filepath">The filesystem path to the partial view.</param>
|
|
|
|
|
/// <returns>The size of the partial view.</returns>
|
|
|
|
|
long GetPartialViewFileSize(string filepath);
|
2018-06-29 20:27:28 +10:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the content of a view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filename">The name of the view.</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
string GetViewContent(string filename);
|
2012-10-24 11:29:51 -02:00
|
|
|
}
|
2018-06-29 20:27:28 +10:00
|
|
|
}
|