Search Results for

    Show / Hide Table of Contents

    Class EditScript

    An edit script is an ordered collection of edit actions which can be applied to a translation unit.

    Inheritance
    System.Object
    EditScript
    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.LanguagePlatform.TranslationMemory.EditScripts
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    public class EditScript

    Constructors

    EditScript()

    Declaration
    public EditScript()

    Properties

    Actions

    Gets or sets the collection of edit actions.

    Declaration
    public List<EditAction> Actions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<EditAction>

    Continuation

    Gets or sets a value which indicates how to continue with the edit script once an action has been applied successfully.

    Declaration
    public Continuation Continuation { get; set; }
    Property Value
    Type Description
    Continuation

    Filter

    Gets or sets a filter condition. If non-null, the edit script will only be applied to TUs which match the filter.

    Declaration
    public FilterExpression Filter { get; set; }
    Property Value
    Type Description
    FilterExpression

    Methods

    Add(EditAction)

    Adds the provided action to the list of edit script actions.

    Declaration
    public void Add(EditAction action)
    Parameters
    Type Name Description
    EditAction action

    The action to add

    Clear()

    Clears all actions in the script.

    Declaration
    public void Clear()

    Load(Stream)

    Loads an edit script from the specified stream.

    Declaration
    public static EditScript Load(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to read the data from

    Returns
    Type Description
    EditScript

    The edit script loaded from the specified stream.

    Load(String)

    Loads an edit script from the specified file name.

    Declaration
    public static EditScript Load(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The file name to load the data from.

    Returns
    Type Description
    EditScript

    The edit script stored in the specified file.

    Save(Stream)

    Serializes the edit script to the specified output stream.

    Declaration
    public void Save(Stream outputStream)
    Parameters
    Type Name Description
    System.IO.Stream outputStream

    The output stream.

    Save(String)

    Saves the edit script in the specified file.

    Declaration
    public void Save(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The file name to save the script in. Existing files will be overwritten.

    Validate(IFieldDefinitions, Boolean)

    Validates the edit script against the provided field definitions.

    Declaration
    public bool Validate(IFieldDefinitions fields, bool throwIfInvalid)
    Parameters
    Type Name Description
    IFieldDefinitions fields

    The field definitions to validate against.

    System.Boolean throwIfInvalid

    If true, an exception will be thrown if invalid field names or other issues are encountered. If false, the return value will be set to false without an exception being thrown.

    Returns
    Type Description
    System.Boolean

    true if the edit script is valid, given the provided field definitions. false otherwise.

    On this page

    • Constructors
      • EditScript()
    • Properties
      • Actions
      • Continuation
      • Filter
    • Methods
      • Add(EditAction)
      • Clear()
      • Load(Stream)
      • Load(String)
      • Save(Stream)
      • Save(String)
      • Validate(IFieldDefinitions, Boolean)
    Back to top Generated by DocFX