Interface IPartialViewService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IPartialViewService : IBasicFileService<IPartialView>
Methods
View SourceCreateAsync(PartialViewCreateModel, Guid)
Creates a new partial view.
Declaration
Task<Attempt<IPartialView, PartialViewOperationStatus>> CreateAsync(PartialViewCreateModel createModel, Guid userKey)
Parameters
Type | Name | Description |
---|---|---|
Partial |
createModel | Partial |
Guid | userKey | The key of the user performing the operation. |
Returns
Type | Description |
---|---|
Task<Attempt<IPartial |
An attempt indicating if the operation was a success as well as a more detailed Partial |
DeleteAsync(String, Guid)
Deletes a partial view.
Declaration
Task<PartialViewOperationStatus> DeleteAsync(string path, Guid userKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The path of the partial view to delete. |
Guid | userKey | The key of the user performing the operation. |
Returns
Type | Description |
---|---|
Task<Partial |
An operation status. |
GetSnippetAsync(String)
Gets a partial view snippet by ID, returns null if not found.
Declaration
Task<PartialViewSnippet> GetSnippetAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The name of the snippet to get. |
Returns
Type | Description |
---|---|
Task<Partial |
The partial view snippet, null if not found. |
GetSnippetsAsync(Int32, Int32)
Gets all the available partial view snippets.
Declaration
Task<PagedModel<PartialViewSnippetSlim>> GetSnippetsAsync(int skip, int take)
Parameters
Type | Name | Description |
---|---|---|
System. |
skip | Amount to skip. |
System. |
take | Amount to take. |
Returns
Type | Description |
---|---|
Task<Paged |
RenameAsync(String, PartialViewRenameModel, Guid)
Renames a partial view.
Declaration
Task<Attempt<IPartialView, PartialViewOperationStatus>> RenameAsync(string path, PartialViewRenameModel renameModel, Guid userKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The path of the partial view to rename. |
Partial |
renameModel | A Partial |
Guid | userKey | The key of the user performing the operation. |
Returns
Type | Description |
---|---|
Task<Attempt<IPartial |
An attempt indicating if the operation was a success as well as a more detailed Partial |
UpdateAsync(String, PartialViewUpdateModel, Guid)
Updates an existing partial view.
Declaration
Task<Attempt<IPartialView, PartialViewOperationStatus>> UpdateAsync(string path, PartialViewUpdateModel updateModel, Guid userKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
path | The path of the partial view to update. |
Partial |
updateModel | A Partial |
Guid | userKey | The key of the user performing the operation. |
Returns
Type | Description |
---|---|
Task<Attempt<IPartial |
An attempt indicating if the operation was a success as well as a more detailed Partial |