Class AddIndexStrategy
A OnDuplicateFormFieldNameStrategy implementation that adds an index to the field name of the second field
public class AddIndexStrategy : OnDuplicateFormFieldNameStrategy
- Inheritance
-
AddIndexStrategy
- Implements
- Inherited Members
Constructors
AddIndexStrategy()
public AddIndexStrategy()
AddIndexStrategy(string)
Creates a new AddIndexStrategy instance.
public AddIndexStrategy(string separator)
Parameters
separator
stringthe separator that will be used to separate the original field name and the index
Methods
Execute(PdfFormField, PdfFormField, bool)
Renames the second field by adding an index to its name.
public virtual bool Execute(PdfFormField firstField, PdfFormField secondField, bool throwExceptionOnError)
Parameters
firstField
PdfFormFieldthe first field
secondField
PdfFormFieldthe second field
throwExceptionOnError
boolif true, an exception will be thrown
Returns
- bool
true if the second field was renamed successfully, false otherwise