ConfigScope

Description

sealed class Tinman.Core.Config.ConfigScope

Derived from

IConfigScope

Default implementation of the IConfigScope interface that allows new local variables to be added to the scope.

Public / Constants

Empty


public static readonly attribute Empty → (IConfigScope)

An empty IConfigScope instance.

Public / Constructors

Config​Scope


public constructor ConfigScope → (1)

parent opt : IConfigValueBag = null

The parent scope or null.

Creates a new instance of ConfigScope.

Public / Methods

Add​Variable

2 overloads


public method AddVariable1 → (2)

name in : string

[not-empty]
The variable name.

type in : ConfigType

[not-null]
The variable type.

Adds a new variable to this scope, without initializing it.

If a variable of the given name in already exists, it will be replaced.


public method AddVariable2 → (2)

name in : string

[not-empty]
The variable name.

expr in : ConfigExpression

[not-null]
The variable type.

Adds a new variable to this scope, without initializing it.

If a variable of the given name in already exists, it will be replaced.

Add​Variable​And​Set

2 overloads


public method AddVariableAndSet1 → (2)

name in : string

[not-empty]
The variable name.

type in : ConfigType

[not-null]
The variable type.

returns → ConfigValue

The config value object of the added variable.

Adds a new variable to this scope.

If a variable of the given name in already exists, it will be replaced.


public method AddVariableAndSet2 → (2)

name in : string

[not-empty]
The variable name.

value in : ConfigExpression

[not-null]
The variable value.

Adds a new variable to this scope.

If a variable of the given name in already exists, it will be replaced.

ConfigException

If an error has occurred while evaluating value in.