• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Class ScriptService

    Inheritance
    System.Object
    RepositoryService
    FileServiceBase<IScriptRepository, IScript>
    FileServiceOperationBase<IScriptRepository, IScript, ScriptOperationStatus>
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class ScriptService : FileServiceOperationBase<IScriptRepository, IScript, ScriptOperationStatus>, IService, IScriptService, IBasicFileService<IScript>

    Constructors

    View Source

    ScriptService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IScriptRepository, ILogger<StylesheetService>, IUserIdKeyResolver, IAuditRepository)

    Declaration
    public ScriptService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IScriptRepository repository, ILogger<StylesheetService> logger, IUserIdKeyResolver userIdKeyResolver, IAuditRepository auditRepository)
    Parameters
    Type Name Description
    ICoreScopeProvider provider
    ILoggerFactory loggerFactory
    IEventMessagesFactory eventMessagesFactory
    IScriptRepository repository
    ILogger<StylesheetService> logger
    IUserIdKeyResolver userIdKeyResolver
    IAuditRepository auditRepository

    Properties

    View Source

    AllowedFileExtensions

    Declaration
    protected override string[] AllowedFileExtensions { get; }
    Property Value
    Type Description
    System.String[]
    View Source

    AlreadyExists

    Declaration
    protected override ScriptOperationStatus AlreadyExists { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    CancelledByNotification

    Declaration
    protected override ScriptOperationStatus CancelledByNotification { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    EntityType

    Declaration
    protected override string EntityType { get; }
    Property Value
    Type Description
    System.String
    View Source

    InvalidFileExtension

    Declaration
    protected override ScriptOperationStatus InvalidFileExtension { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    InvalidName

    Declaration
    protected override ScriptOperationStatus InvalidName { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    NotFound

    Declaration
    protected override ScriptOperationStatus NotFound { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    ParentNotFound

    Declaration
    protected override ScriptOperationStatus ParentNotFound { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    PathTooLong

    Declaration
    protected override ScriptOperationStatus PathTooLong { get; }
    Property Value
    Type Description
    ScriptOperationStatus
    View Source

    Success

    Declaration
    protected override ScriptOperationStatus Success { get; }
    Property Value
    Type Description
    ScriptOperationStatus

    Methods

    View Source

    CreateAsync(ScriptCreateModel, Guid)

    Creates a new script.

    Declaration
    public async 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

    CreateEntity(String, String)

    Declaration
    protected override IScript CreateEntity(string path, string content)
    Parameters
    Type Name Description
    System.String path
    System.String content
    Returns
    Type Description
    IScript
    View Source

    DeleteAsync(String, Guid)

    Deletes a Script.

    Declaration
    public async 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

    DeletedNotification(IScript, EventMessages)

    Declaration
    protected override ScriptDeletedNotification DeletedNotification(IScript target, EventMessages messages)
    Parameters
    Type Name Description
    IScript target
    EventMessages messages
    Returns
    Type Description
    ScriptDeletedNotification
    View Source

    DeletingNotification(IScript, EventMessages)

    Declaration
    protected override ScriptDeletingNotification DeletingNotification(IScript target, EventMessages messages)
    Parameters
    Type Name Description
    IScript target
    EventMessages messages
    Returns
    Type Description
    ScriptDeletingNotification
    View Source

    RenameAsync(String, ScriptRenameModel, Guid)

    Renames a script.

    Declaration
    public async 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

    SavedNotification(IScript, EventMessages)

    Declaration
    protected override ScriptSavedNotification SavedNotification(IScript target, EventMessages messages)
    Parameters
    Type Name Description
    IScript target
    EventMessages messages
    Returns
    Type Description
    ScriptSavedNotification
    View Source

    SavingNotification(IScript, EventMessages)

    Declaration
    protected override ScriptSavingNotification SavingNotification(IScript target, EventMessages messages)
    Parameters
    Type Name Description
    IScript target
    EventMessages messages
    Returns
    Type Description
    ScriptSavingNotification
    View Source

    UpdateAsync(String, ScriptUpdateModel, Guid)

    Updates an existing script.

    Declaration
    public async 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
    • Constructors
      • ScriptService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IScriptRepository, ILogger<StylesheetService>, IUserIdKeyResolver, IAuditRepository)
    • Properties
      • AllowedFileExtensions
      • AlreadyExists
      • CancelledByNotification
      • EntityType
      • InvalidFileExtension
      • InvalidName
      • NotFound
      • ParentNotFound
      • PathTooLong
      • Success
    • Methods
      • CreateAsync(ScriptCreateModel, Guid)
      • CreateEntity(String, String)
      • DeleteAsync(String, Guid)
      • DeletedNotification(IScript, EventMessages)
      • DeletingNotification(IScript, EventMessages)
      • RenameAsync(String, ScriptRenameModel, Guid)
      • SavedNotification(IScript, EventMessages)
      • SavingNotification(IScript, EventMessages)
      • UpdateAsync(String, ScriptUpdateModel, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX