Table of Contents

Class VariableStore

Namespace
Ranorex.Core.Data
Assembly
Ranorex.Core.dll
public class VariableStore : IDataProvider, IEnumerable<KeyValuePair<CaseInsensitiveString, VariableStore.Entry>>, IEnumerable
Inheritance
VariableStore
Implements
IEnumerable<KeyValuePair<CaseInsensitiveString, VariableStore.Entry>>
Inherited Members
Extension Methods

Constructors

VariableStore(IVariableBindingContainer)

public VariableStore(IVariableBindingContainer container)

Parameters

container IVariableBindingContainer

VariableStore(IVariableBindingContainer, XmlNode, out bool)

public VariableStore(IVariableBindingContainer container, XmlNode node, out bool isDirty)

Parameters

container IVariableBindingContainer
node XmlNode
isDirty bool

Properties

AssociatedStore

public VariableStore AssociatedStore { get; set; }

Property Value

VariableStore

AvailableVariableNames

public IList<CaseInsensitiveString> AvailableVariableNames { get; }

Property Value

IList<CaseInsensitiveString>

Container

public IVariableBindingContainer Container { get; }

Property Value

IVariableBindingContainer

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

VariableNames

Gets a collection of all available variable names.

public ICollection<CaseInsensitiveString> VariableNames { get; }

Property Value

ICollection<CaseInsensitiveString>

Methods

AddVariable(CaseInsensitiveString, string)

public void AddVariable(CaseInsensitiveString variableName, string defaultValue)

Parameters

variableName CaseInsensitiveString
defaultValue string

Clone()

public VariableStore Clone()

Returns

VariableStore

Clone(IVariableBindingContainer)

public VariableStore Clone(IVariableBindingContainer assignedContainer)

Parameters

assignedContainer IVariableBindingContainer

Returns

VariableStore

Clone(IVariableBindingContainer, bool)

public VariableStore Clone(IVariableBindingContainer assignedContainer, bool newIds)

Parameters

assignedContainer IVariableBindingContainer
newIds bool

Returns

VariableStore

Clone(bool)

public VariableStore Clone(bool newIds)

Parameters

newIds bool

Returns

VariableStore

ContainsVariable(CaseInsensitiveString)

public bool ContainsVariable(CaseInsensitiveString name)

Parameters

name CaseInsensitiveString

Returns

bool

CreateUniqueVariableName(string)

public CaseInsensitiveString CreateUniqueVariableName(string name)

Parameters

name string

Returns

CaseInsensitiveString

EnsureVariableExists(CaseInsensitiveString)

public void EnsureVariableExists(CaseInsensitiveString variableName)

Parameters

variableName CaseInsensitiveString

EnsureVariableExists(CaseInsensitiveString, string)

public void EnsureVariableExists(CaseInsensitiveString variableName, string defaultValue)

Parameters

variableName CaseInsensitiveString
defaultValue string

FixVariableName(string)

public static string FixVariableName(string name)

Parameters

name string

Returns

string

GetAssociatedVariables()

public IDictionary<CaseInsensitiveString, CaseInsensitiveString> GetAssociatedVariables()

Returns

IDictionary<CaseInsensitiveString, CaseInsensitiveString>

GetAssociatedVariablesWithoutOverrides()

public IDictionary<CaseInsensitiveString, CaseInsensitiveString> GetAssociatedVariablesWithoutOverrides()

Returns

IDictionary<CaseInsensitiveString, CaseInsensitiveString>

GetDefaultValue(CaseInsensitiveString)

public string GetDefaultValue(CaseInsensitiveString variableName)

Parameters

variableName CaseInsensitiveString

Returns

string

GetEnumerator()

public IEnumerator<KeyValuePair<CaseInsensitiveString, VariableStore.Entry>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<CaseInsensitiveString, VariableStore.Entry>>

GetReferencedVariableNames(IVariableBindingContainer, ICollection<CaseInsensitiveString>)

public static bool GetReferencedVariableNames(IVariableBindingContainer container, ICollection<CaseInsensitiveString> knownReferencedVariableNames)

Parameters

container IVariableBindingContainer
knownReferencedVariableNames ICollection<CaseInsensitiveString>

Returns

bool

GetValue(CaseInsensitiveString)

Gets the value of the specified variable.

public string GetValue(CaseInsensitiveString variableName)

Parameters

variableName CaseInsensitiveString

The name of the variable.

Returns

string

The value of the variable, or null if the variable does not exist.

GetVariableName(Guid)

public CaseInsensitiveString GetVariableName(Guid id)

Parameters

id Guid

Returns

CaseInsensitiveString

GetXmlNode(XmlNode)

public XmlNode GetXmlNode(XmlNode parent)

Parameters

parent XmlNode

Returns

XmlNode

RemoveVariable(CaseInsensitiveString)

public bool RemoveVariable(CaseInsensitiveString variableName)

Parameters

variableName CaseInsensitiveString

Returns

bool

RenameVariable(CaseInsensitiveString, CaseInsensitiveString)

public void RenameVariable(CaseInsensitiveString variableName, CaseInsensitiveString newName)

Parameters

variableName CaseInsensitiveString
newName CaseInsensitiveString

RenameVariable(CaseInsensitiveString, CaseInsensitiveString, string)

public void RenameVariable(CaseInsensitiveString variableName, CaseInsensitiveString newName, string newDefaultValue)

Parameters

variableName CaseInsensitiveString
newName CaseInsensitiveString
newDefaultValue string

SetDefaultValue(CaseInsensitiveString, string)

public void SetDefaultValue(CaseInsensitiveString variableName, string defaultValue)

Parameters

variableName CaseInsensitiveString
defaultValue string

SetValue(CaseInsensitiveString, string)

Sets the value of the specified variable.

public void SetValue(CaseInsensitiveString variableName, string value)

Parameters

variableName CaseInsensitiveString

The name of the variable.

value string

The value to set the variable to.

Exceptions

NotSupportedException

If setting variable values is not supported by the data provider.

DataException

If setting the variable value fails for any other reason, e.g. if the variable does not exist.

TryAddVariable(CaseInsensitiveString, string)

public bool TryAddVariable(CaseInsensitiveString variableName, string defaultValue)

Parameters

variableName CaseInsensitiveString
defaultValue string

Returns

bool

TryGetVariableName(Guid, out CaseInsensitiveString)

public bool TryGetVariableName(Guid id, out CaseInsensitiveString variableName)

Parameters

id Guid
variableName CaseInsensitiveString

Returns

bool

TryGetVariableStoreEntry(CaseInsensitiveString, out Entry)

public bool TryGetVariableStoreEntry(CaseInsensitiveString variableName, out VariableStore.Entry entry)

Parameters

variableName CaseInsensitiveString
entry VariableStore.Entry

Returns

bool

Events

ReferencedVariableNamesRequest

public static event EventHandler<ReferencedVariableNamesArgs> ReferencedVariableNamesRequest

Event Type

EventHandler<ReferencedVariableNamesArgs>