Class EditAction
Represents a single edit action which can be applied to a TU.
Inheritance
EditAction
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryEditScripts
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
[KnownType(typeof(EditActionChangeFieldValue))]
[KnownType(typeof(EditActionDeleteFieldValue))]
[KnownType(typeof(EditActionDeleteAllFieldValues))]
[KnownType(typeof(EditActionDeleteTags))]
[KnownType(typeof(EditActionRenameField))]
[KnownType(typeof(EditActionSearchReplace))]
public abstract class EditAction
Constructors
EditAction()
Declaration
protected EditAction()
Methods
Apply(TranslationUnit)
Declaration
public abstract bool Apply(TranslationUnit tu)
Parameters
Type | Name | Description |
---|---|---|
TranslationUnit | tu | The TU to apply the edit action to |
Returns
Type | Description |
---|---|
bool |
|
Validate(IFieldDefinitions, bool)
Validates the edit action against the provided field definitions.
Declaration
public abstract bool Validate(IFieldDefinitions fields, bool throwIfInvalid)
Parameters
Type | Name | Description |
---|---|---|
IFieldDefinitions | fields | The field definitions to validate against. |
bool | 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 |
---|---|
bool |
|