Table of Contents

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

variableName string

The name of the user variable.

Property Value

UserVariable

The UserVariable with the specified name, or null if 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

name string

The name of the user variable.

contents string

The 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

variableName string

The name of the user variable to find.

Returns

UserVariable

The UserVariable with the specified name, or null if not found.

RemoveSnapshot(ShortGuid)

Removes a previously created snapshot, releasing any resources associated with it.

public void RemoveSnapshot(ShortGuid id)

Parameters

id ShortGuid

The 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

id ShortGuid

The combit.Reporting.Helpers.ShortGuid identifying the snapshot to restore.

removeSnapshot bool

If true, removes the snapshot after restoring; otherwise, retains the snapshot.