Class EditActionRenameField
Represents a single edit action which can be applied to a TU.
Inherited Members
Namespace: Sdl.LanguagePlatform .TranslationMemory .EditScripts
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
public class EditActionRenameField : EditAction
Constructors
EditActionRenameField(string, string)
Initializes a new instance with the specified values.
Declaration
public EditActionRenameField(string fromName, string toName)
Parameters
Properties
FromName
Gets or sets the field name prior to the change.
Declaration
[DataMember]
public string FromName { get; set; }
Property Value
Type | Description |
---|---|
string |
PicklistValueMap
Gets or sets a picklist value name mapping for picklist values. This will only be applied to picklist fields.
Declaration
[DataMember]
public Dictionary<string, string> PicklistValueMap { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> |
ToName
Gets or sets the new field name. Cannot be a reserved field name (i.e. a system field).
Declaration
[DataMember]
public string ToName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Apply(TranslationUnit)
Declaration
public override bool Apply(TranslationUnit tu)
Parameters
Type | Name | Description |
---|---|---|
Translation |
tu | The TU to apply the edit action to |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Validate(IFieldDefinitions, bool)
Validates the edit action against the provided field definitions.
Declaration
public override bool Validate(IFieldDefinitions fields, bool throwIfInvalid)
Parameters
Type | Name | Description |
---|---|---|
IField |
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 |
|