Class AlwaysThrowExceptionStrategy
A OnDuplicateFormFieldNameStrategy implementation that throws an exception if the second field has the same name as the first field.
public class AlwaysThrowExceptionStrategy : OnDuplicateFormFieldNameStrategy
- Inheritance
-
AlwaysThrowExceptionStrategy
- Implements
- Inherited Members
Constructors
AlwaysThrowExceptionStrategy()
Creates an instance of AlwaysThrowExceptionStrategy
public AlwaysThrowExceptionStrategy()
Methods
Execute(PdfFormField, PdfFormField, bool)
executes the strategy.
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