Interface IStylesheetService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IStylesheetService : IBasicFileService<IStylesheet>Methods
View SourceCreateAsync(StylesheetCreateModel, Guid)
Creates a new stylesheet.
Declaration
Task<Attempt<IStylesheet, StylesheetOperationStatus>> CreateAsync(StylesheetCreateModel createModel, Guid userKey)Parameters
| Type | Name | Description | 
|---|---|---|
| StylesheetCreateModel | createModel | StylesheetCreateModel containing the information about the stylesheet being created. | 
| Guid | userKey | The key of the user performing the operation. | 
Returns
| Type | Description | 
|---|---|
| Task<Attempt<IStylesheet, StylesheetOperationStatus>> | An attempt indicating if the operation was a success as well as a more detailed StylesheetOperationStatus. | 
DeleteAsync(String, Guid)
Deletes a stylesheet.
Declaration
Task<StylesheetOperationStatus> DeleteAsync(string path, Guid userKey)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | path | The path of the stylesheet to delete. | 
| Guid | userKey | The key of the user performing the operation. | 
Returns
| Type | Description | 
|---|---|
| Task<StylesheetOperationStatus> | An operation status. | 
RenameAsync(String, StylesheetRenameModel, Guid)
Renames a stylesheet.
Declaration
Task<Attempt<IStylesheet, StylesheetOperationStatus>> RenameAsync(string path, StylesheetRenameModel renameModel, Guid userKey)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | path | The path of the stylesheet to rename. | 
| StylesheetRenameModel | renameModel | A StylesheetRenameModel with the changes. | 
| Guid | userKey | The key of the user performing the operation. | 
Returns
| Type | Description | 
|---|---|
| Task<Attempt<IStylesheet, StylesheetOperationStatus>> | An attempt indicating if the operation was a success as well as a more detailed StylesheetOperationStatus. | 
UpdateAsync(String, StylesheetUpdateModel, Guid)
Updates an existing stylesheet.
Declaration
Task<Attempt<IStylesheet, StylesheetOperationStatus>> UpdateAsync(string path, StylesheetUpdateModel updateModel, Guid userKey)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | path | The path of the stylesheet to update. | 
| StylesheetUpdateModel | updateModel | A StylesheetUpdateModel with the changes. | 
| Guid | userKey | The key of the user performing the operation. | 
Returns
| Type | Description | 
|---|---|
| Task<Attempt<IStylesheet, StylesheetOperationStatus>> | An attempt indicating if the operation was a success as well as a more detailed StylesheetOperationStatus. |