Class CollectionUserVariables
- Namespace
- combit.Reporting.Dom
- Assembly
- combit.ListLabel31.CrossPlatform.dll
Represents a collection of user-defined variables within a report. This class provides methods to update, reset, and revert values of all contained UserVariable instances. Implements the combit.Expressions.IIdentifierProvider interface to support identifier evaluation and the combit.Expressions.IValueReversion interface to manage value reversion behavior.
public class CollectionUserVariables : DomCollectionBase<UserVariable>, IList<UserVariable>, ICollection<UserVariable>, IReadOnlyList<UserVariable>, IReadOnlyCollection<UserVariable>, IEnumerable<UserVariable>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, IDomCollectionBase
- Inheritance
-
CollectionUserVariables
- Implements
- Inherited Members
Properties
this[string]
Gets the user variable with the specified name, or null if not found.
public UserVariable this[string variableName] { get; }
Parameters
variableNamestringThe name of the user variable.
Property Value
- UserVariable
The UserVariable with the specified name, or
nullif not found.
Methods
AddNew()
Adds a new user variable to the collection.
public UserVariable AddNew()
Returns
- UserVariable
The newly created UserVariable.
AddNew(string, string)
Adds a new user variable with the specified name and contents.
public UserVariable AddNew(string name, string contents)
Parameters
namestringThe name of the user variable.
contentsstringThe contents (expression) of the user variable.
Returns
- UserVariable
The newly created UserVariable.
CreateSnapshot()
Creates a snapshot of the current object state.
public ShortGuid CreateSnapshot()
Returns
- ShortGuid
A combit.Reporting.Helpers.ShortGuid that uniquely identifies the created snapshot.
GetVariable(string)
Finds a user variable by its name.
protected UserVariable GetVariable(string variableName)
Parameters
variableNamestringThe name of the user variable to find.
Returns
- UserVariable
The UserVariable with the specified name, or
nullif not found.
RemoveSnapshot(ShortGuid)
Removes a previously created snapshot, releasing any resources associated with it.
public void RemoveSnapshot(ShortGuid id)
Parameters
idShortGuidThe combit.Reporting.Helpers.ShortGuid identifying the snapshot to remove.
ResetToSnapshot(ShortGuid, bool)
Restores the object state to a previously created snapshot and optionally removes the associated snapshot.
public void ResetToSnapshot(ShortGuid id, bool removeSnapshot = true)
Parameters
idShortGuidThe combit.Reporting.Helpers.ShortGuid identifying the snapshot to restore.
removeSnapshotboolIf
true, removes the snapshot after restoring; otherwise, retains the snapshot.