Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IScriptService

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IScriptService : IBasicFileService<IScript>

    Methods

    View Source

    CreateAsync(ScriptCreateModel, Guid)

    Creates a new script.

    Declaration
    Task<Attempt<IScript, ScriptOperationStatus>> CreateAsync(ScriptCreateModel createModel, Guid userKey)
    Parameters
    Type Name Description
    ScriptCreateModel createModel

    ScriptCreateModel containing the information about the script being created.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IScript, ScriptOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed ScriptOperationStatus.

    View Source

    DeleteAsync(String, Guid)

    Deletes a Script.

    Declaration
    Task<ScriptOperationStatus> DeleteAsync(string path, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the script to delete.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<ScriptOperationStatus>

    An operation status.

    View Source

    RenameAsync(String, ScriptRenameModel, Guid)

    Renames a script.

    Declaration
    Task<Attempt<IScript, ScriptOperationStatus>> RenameAsync(string path, ScriptRenameModel renameModel, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the script to rename.

    ScriptRenameModel renameModel

    A ScriptRenameModel with the changes.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IScript, ScriptOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed ScriptOperationStatus.

    View Source

    UpdateAsync(String, ScriptUpdateModel, Guid)

    Updates an existing script.

    Declaration
    Task<Attempt<IScript, ScriptOperationStatus>> UpdateAsync(string path, ScriptUpdateModel updateModel, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the script to update.

    ScriptUpdateModel updateModel

    A ScriptUpdateModel with the changes.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IScript, ScriptOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed ScriptOperationStatus.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateAsync(ScriptCreateModel, Guid)
      • DeleteAsync(String, Guid)
      • RenameAsync(String, ScriptRenameModel, Guid)
      • UpdateAsync(String, ScriptUpdateModel, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX