View Source
Interface ITemplateRepository
Assembly: Umbraco.Core.dll
Syntax
public interface ITemplateRepository : IReadWriteQueryRepository<int, ITemplate>, IReadRepository<int, ITemplate>, IWriteRepository<ITemplate>, IQueryRepository<ITemplate>, IRepository
Methods
View Source
Get(String)
Declaration
ITemplate Get(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
View Source
GetAll(String[])
Declaration
IEnumerable<ITemplate> GetAll(params string[] aliases)
Parameters
Type |
Name |
Description |
System.String[] |
aliases |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
View Source
GetChildren(Int32)
Declaration
IEnumerable<ITemplate> GetChildren(int masterTemplateId)
Parameters
Type |
Name |
Description |
System.Int32 |
masterTemplateId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
View Source
GetChildren(String)
Declaration
IEnumerable<ITemplate> GetChildren(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
View Source
GetDescendants(Int32)
Declaration
IEnumerable<ITemplate> GetDescendants(int masterTemplateId)
Parameters
Type |
Name |
Description |
System.Int32 |
masterTemplateId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
View Source
GetDescendants(String)
Declaration
IEnumerable<ITemplate> GetDescendants(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
View Source
GetFileContentStream(String)
Gets the content of a template as a stream.
Declaration
Stream GetFileContentStream(string filepath)
Parameters
Type |
Name |
Description |
System.String |
filepath |
The filesystem path to the template.
|
Returns
Type |
Description |
System.IO.Stream |
The content of the template.
|
View Source
GetFileSize(String)
Declaration
long GetFileSize(string filepath)
Parameters
Type |
Name |
Description |
System.String |
filepath |
|
Returns
Type |
Description |
System.Int64 |
|
View Source
SetFileContent(String, Stream)
Sets the content of a template.
Declaration
void SetFileContent(string filepath, Stream content)
Parameters
Type |
Name |
Description |
System.String |
filepath |
The filesystem path to the template.
|
System.IO.Stream |
content |
The content of the template.
|
View Source
ValidateTemplate(ITemplate)
Declaration
bool ValidateTemplate(ITemplate template)
Parameters
Returns
Type |
Description |
System.Boolean |
True if Script is valid, otherwise false
|