View Source
  Class ScriptService
  
  
  
  
    Inheritance
      System.Object
      
      
      
      
   
  
  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
  
  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
  
  
    View Source
  
  CancelledByNotification
  
  
  Declaration
  
    protected override ScriptOperationStatus CancelledByNotification { get; }
   
  Property Value
  
  
    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
  
  
    View Source
  
  InvalidName
  
  
  Declaration
  
    protected override ScriptOperationStatus InvalidName { get; }
   
  Property Value
  
  
    View Source
  
  NotFound
  
  
  Declaration
  
    protected override ScriptOperationStatus NotFound { get; }
   
  Property Value
  
  
    View Source
  
  ParentNotFound
  
  
  Declaration
  
    protected override ScriptOperationStatus ParentNotFound { get; }
   
  Property Value
  
  
    View Source
  
  
  
  
  Declaration
  
    protected override ScriptOperationStatus PathTooLong { get; }
   
  Property Value
  
  
    View Source
  
  Success
  
  
  Declaration
  
    protected override ScriptOperationStatus Success { get; }
   
  Property Value
  
  Methods
  
  
    View Source
  
  CreateAsync(ScriptCreateModel, Guid)
  
  
  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
  
  
    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
  
  
    View Source
  
  DeleteAsync(String, Guid)
  
  
  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
  
  
    View Source
  
  DeletedNotification(IScript, EventMessages)
  
  
  Declaration
  
    protected override ScriptDeletedNotification DeletedNotification(IScript target, EventMessages messages)
   
  Parameters
  
  Returns
  
  
    View Source
  
  DeletingNotification(IScript, EventMessages)
  
  
  Declaration
  
    protected override ScriptDeletingNotification DeletingNotification(IScript target, EventMessages messages)
   
  Parameters
  
  Returns
  
  
    View Source
  
  RenameAsync(String, ScriptRenameModel, Guid)
  
  
  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
  
  
    View Source
  
  SavedNotification(IScript, EventMessages)
  
  
  Declaration
  
    protected override ScriptSavedNotification SavedNotification(IScript target, EventMessages messages)
   
  Parameters
  
  Returns
  
  
    View Source
  
  SavingNotification(IScript, EventMessages)
  
  
  Declaration
  
    protected override ScriptSavingNotification SavingNotification(IScript target, EventMessages messages)
   
  Parameters
  
  Returns
  
  
    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