Search Results for

    Show / Hide Table of Contents

    Class AbstractFileLevelAutomaticTask

    Base class for file level automatic task.

    Inheritance
    System.Object
    AbstractFileLevelAutomaticTask
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.ProjectAutomation.AutomaticTasks
    Assembly: Sdl.ProjectAutomation.AutomaticTasks.dll
    Syntax
    public abstract class AbstractFileLevelAutomaticTask

    Constructors

    AbstractFileLevelAutomaticTask()

    Declaration
    protected AbstractFileLevelAutomaticTask()

    Properties

    IsCancelRequested

    Checks if the task is requested to be cancelled.

    Declaration
    public bool IsCancelRequested { get; }
    Property Value
    Type Description
    System.Boolean

    Project

    Gets the project for this task.

    Declaration
    public IProject Project { get; }
    Property Value
    Type Description
    IProject

    ShouldAddNewFileVersion

    Gets/Sets if this task should add a new version of the files. If the task updates the task files, it should be set to true so the updated files will be preserved.

    Declaration
    public bool ShouldAddNewFileVersion { get; set; }
    Property Value
    Type Description
    System.Boolean

    TaskFiles

    Gets the files for this task.

    Declaration
    public ProjectFile[] TaskFiles { get; }
    Property Value
    Type Description
    ProjectFile[]

    Methods

    Cancel(Boolean)

    Called when the task execution is request to cancel.

    Declaration
    public virtual void Cancel(bool doRollback)
    Parameters
    Type Name Description
    System.Boolean doRollback

    Execute()

    Executes the task. This function does the default implementation: ensure the files ready for the task, calls ProcessFile for each files and then populate the files if the files are updated.

    Declaration
    public virtual void Execute()

    OnFileProgress(TaskProgressEventArgs)

    Reports the progress of this task.

    Declaration
    protected virtual void OnFileProgress(TaskProgressEventArgs e)
    Parameters
    Type Name Description
    TaskProgressEventArgs e

    The task progress event args

    OnInitializeTask()

    Called when the task is initialized. Overwrite this function where further initialization is required.

    Declaration
    protected virtual void OnInitializeTask()

    ProcessFile(ProjectFile)

    Processes the file. It is implemented in the derived class.

    Declaration
    protected abstract void ProcessFile(ProjectFile projectFile)
    Parameters
    Type Name Description
    ProjectFile projectFile

    the file to process

    TaskComplete()

    Called when the task is completed. Overwrite this function when further operation is required.

    Declaration
    public virtual void TaskComplete()

    UploadFile(ProjectFile, String)

    Uploads the file for the new version generated.

    Declaration
    protected virtual void UploadFile(ProjectFile projectFile, string localFilePath)
    Parameters
    Type Name Description
    ProjectFile projectFile

    The file to update

    System.String localFilePath

    The local path of the file.

    Events

    Progress

    The task progress event.

    Declaration
    public event EventHandler<TaskProgressEventArgs> Progress
    Event Type
    Type Description
    System.EventHandler<TaskProgressEventArgs>

    On this page

    • Constructors
      • AbstractFileLevelAutomaticTask()
    • Properties
      • IsCancelRequested
      • Project
      • ShouldAddNewFileVersion
      • TaskFiles
    • Methods
      • Cancel(Boolean)
      • Execute()
      • OnFileProgress(TaskProgressEventArgs)
      • OnInitializeTask()
      • ProcessFile(ProjectFile)
      • TaskComplete()
      • UploadFile(ProjectFile, String)
    • Events
      • Progress
    Back to top Generated by DocFX