A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://apidocs.umbraco.com/v15/csharp/api/Umbraco.Cms.Core.Services.TemplateService.html below:

View Source Class TemplateService Inheritance

System.Object

Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntax
public class TemplateService : RepositoryService, ITemplateService, IService
Constructors View Source TemplateService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IShortStringHelper, ITemplateRepository, IAuditRepository, ITemplateContentParserService, IUserIdKeyResolver, IDefaultViewContentProvider) Declaration
public TemplateService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IShortStringHelper shortStringHelper, ITemplateRepository templateRepository, IAuditRepository auditRepository, ITemplateContentParserService templateContentParserService, IUserIdKeyResolver userIdKeyResolver, IDefaultViewContentProvider defaultViewContentProvider)
Parameters Methods View Source CreateAsync(String, String, String, Guid, Nullable<Guid>)

Creates a new template

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> CreateAsync(string name, string alias, string content, Guid userKey, Guid? templateKey = null)
Parameters Type Name Description System.String name

Name of the new template

System.String alias

Alias of the template

System.String content

View content for the new template

Guid userKey

Key of the user performing the Create.

System.Nullable<Guid> templateKey Returns View Source CreateAsync(ITemplate, Guid)

Creates a new template

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> CreateAsync(ITemplate template, Guid userKey)
Parameters Type Name Description ITemplate template

The new template

Guid userKey

Key of the user performing the Create.

Returns View Source CreateForContentTypeAsync(String, String, Guid)

Creates a template for a content type

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> CreateForContentTypeAsync(string contentTypeAlias, string contentTypeName, Guid userKey)
Parameters Type Name Description System.String contentTypeAlias System.String contentTypeName Guid userKey

Key of the user performing the Create.

Returns View Source DeleteAsync(Guid, Guid)

Deletes a template by its key

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> DeleteAsync(Guid key, Guid userKey)
Parameters Type Name Description Guid key

Key of the ITemplate to delete

Guid userKey

Key of the user performing the Delete.

Returns View Source DeleteAsync(String, Guid)

Deletes a template by its alias

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> DeleteAsync(string alias, Guid userKey)
Parameters Type Name Description System.String alias

Alias of the ITemplate to delete

Guid userKey

Key of the user performing the Delete.

Returns View Source GetAllAsync(Guid[])

Gets a list of all ITemplate objects

Declaration
public Task<IEnumerable<ITemplate>> GetAllAsync(params Guid[] keys)
Parameters Type Name Description Guid[] keys Returns View Source GetAllAsync(String[])

Gets a list of all ITemplate objects

Declaration
public async Task<IEnumerable<ITemplate>> GetAllAsync(params string[] aliases)
Parameters Type Name Description System.String[] aliases Returns View Source GetAsync(Guid)

Gets a ITemplate object by its guid identifier.

Declaration
public async Task<ITemplate> GetAsync(Guid id)
Parameters Type Name Description Guid id

The guid identifier of the template.

Returns View Source GetAsync(Int32)

Gets a ITemplate object by its identifier.

Declaration
public async Task<ITemplate> GetAsync(int id)
Parameters Type Name Description System.Int32 id

The identifier of the template.

Returns View Source GetAsync(String)

Gets a ITemplate object by its alias.

Declaration
public async Task<ITemplate> GetAsync(string alias)
Parameters Type Name Description System.String alias

The alias of the template.

Returns View Source GetChildrenAsync(Int32)

Gets a list of all ITemplate objects

Declaration
public async Task<IEnumerable<ITemplate>> GetChildrenAsync(int masterTemplateId)
Parameters Type Name Description System.Int32 masterTemplateId Returns View Source GetDescendantsAsync(Int32)

Gets the template descendants

Declaration
public async Task<IEnumerable<ITemplate>> GetDescendantsAsync(int masterTemplateId)
Parameters Type Name Description System.Int32 masterTemplateId Returns Type Description Task<IEnumerable<ITemplate>> View Source GetFileContentStreamAsync(String)

Gets the content of a template as a stream.

Declaration
public async Task<Stream> GetFileContentStreamAsync(string filepath)
Parameters Type Name Description System.String filepath

The filesystem path to the template.

Returns Type Description Task<Stream>

The content of the template.

View Source GetFileSizeAsync(String)

Gets the size of a template.

Declaration
public async Task<long> GetFileSizeAsync(string filepath)
Parameters Type Name Description System.String filepath

The filesystem path to the template.

Returns Type Description Task<System.Int64>

The size of the template.

View Source SetFileContentAsync(String, Stream)

Sets the content of a template.

Declaration
public async Task SetFileContentAsync(string filepath, Stream content)
Parameters Type Name Description System.String filepath

The filesystem path to the template.

Stream content

The content of the template.

Returns View Source UpdateAsync(ITemplate, Guid)

Updates a ITemplate

Declaration
public async Task<Attempt<ITemplate, TemplateOperationStatus>> UpdateAsync(ITemplate template, Guid userKey)
Parameters Type Name Description ITemplate template

ITemplate to update

Guid userKey

Key of the user saving the template

Returns

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4