ConditionalInstructionCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
- Implements
- ICollection, IEnumerable
Description
An instance of the ConditionalInstructionCollection class contains all conditional instructions in a Text Control document or part of the document represented through objects of type ConditionalInstruction. An instance of this class can be obtained with the FormFieldCollection.ConditionalInstructions property. The ConditionalInstructionCollection class implements the IEnumerable and the ICollection interfaces.
Syntax
public class ConditionalInstructionCollection : ICollection, IEnumerablePublic Class ConditionalInstructionCollection
Implements ICollection, IEnumerableExamples
The following example includes the conditional instruction names value from a Conditional Instruction Collection object in application diagnostics. The created object is then available to the surrounding document workflow.
Console.WriteLine($"Conditional Instruction Names: {conditionalInstructionCollection.ConditionalInstructionNames}");
Console.WriteLine("Conditional Instruction Collection is ready for use.");Console.WriteLine($"Conditional Instruction Names: {conditionalInstructionCollection.ConditionalInstructionNames}")
Console.WriteLine("Conditional Instruction Collection is ready for use.")Members
Properties
| Property | Description |
|---|---|
| ConditionalInstructionNames | Gets the names of all ConditionalInstruction elements that are listed inside the collection. |
| Count | Gets the number of elements contained in the collection. |
Methods
| Method | Description |
|---|---|
| Add | Inserts an instance of the class ConditionalInstruction to the collection and the document. |
| Clear | Removes all conditional instructions from the collection and the document. |
| CopyTo | Copies the elements of the collection to an array, starting at a particular index. |
| GetEnumerator | Returns an enumerator that can be used to iterate through the collection. |
| GetItem | Gets that ConditionalInstruction element from the collection, where the Name property value equals the specified name. |
| GetItems | Gets those ConditionalInstruction elements from the collection, where at least one Condition or Instruction element references the specified FormField. |
| HasValidValue | Not described in the reference. public bool HasValidValue(FormField formField); |
| IsValueValid | Returns a value indicating whether the value of a specific form field is marked as valid. The corresponding validation is executed by the conditions of a conditional instruction and applied by an Instruction object, that marks the related form field as valid or invalid. |
| Remove | Removes that ConditionalInstruction element from the collection and the document, where the Name property value equals the specified name. |