HotDocs.Server.VariableCollection Class
A VariableCollection provides a "data dictionary" of all variables used in a template. HotDocs Server uses the VariableCollection when creating the browser-based interview, to decide which answers in an AnswerCollection should be used to pre-populate the interview and which should be ignored. Host applications may also use a VariableCollection for purposes of providing the necessary data for a specific template.
A VariableCollection object is created based on a template manifest file (published from current versions of HotDocs) or a legacy .HVC file (published from versions prior to 11).
Each variable in the VariableCollection object is assigned an arbitrary index number in the range of 0 to Count - 1. Use this index number to iterate through the collection.
Namespace: HotDocs.Server
Assembly: HotDocs.Server in HotDocs.Server.dll
This class implements the following interfaces:
-
IDisposable: The class can be disposed.
Methods
Method | Description |
VariableCollection (Constructor) | This constructor initializes a new instance of the VariableCollection class. |
Dispose | This method is an implementation of the IDisposable.Dispose method that releases unmanaged resources held by an instance of the VariableCollection class. |
Open | This method opens the template manifest (.manifest.xml) or variable collection (.HVC) file and populates the variable collection object. (You must use this method first if you plan to use the VariableCollection object.) |
VarEncodedName | This method returns the encoded name of the variable at the specified index. |
VarName | This method returns the variable name of the variable at the specified index. |
VarType | This method returns the type of variable at the specified index. |
Properties
Property | Description |
Count | [Read-only] This property returns the number of variables in a variable collection. |
Description | [Read-only] This property returns the template description. |
Title | [Read-only] This property returns the template title. |