Class ExpressionRegistry
Inheritance
Inherited Members
Namespace: SpiceSharpParser.Common.Evaluation
Assembly: SpiceSharpParser.dll
Syntax
public class ExpressionRegistry
Constructors
| Improve this Doc View SourceExpressionRegistry(Boolean, Boolean)
Initializes a new instance of the ExpressionRegistry class.
Declaration
public ExpressionRegistry(bool isParameterNameCaseSensitive, bool isExpressionNameCaseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isParameterNameCaseSensitive | Is parameter name case-sensitive. |
System.Boolean | isExpressionNameCaseSensitive | Is expression name case-sensitive. |
Properties
| Improve this Doc View SourceIsExpressionNameCaseSensitive
Gets a value indicating whether expression names are case sensitive.
Declaration
public bool IsExpressionNameCaseSensitive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsParameterNameCaseSensitive
Gets a value indicating whether parameter names are case sensitive.
Declaration
public bool IsParameterNameCaseSensitive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
NamedExpressions
Gets the dictionary of named expressions.
Declaration
protected Dictionary<string, NamedExpression> NamedExpressions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, NamedExpression> |
Parameters
Gets the dictionary of parameters.
Declaration
protected Dictionary<string, Expression> Parameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, Expression> |
ParametersDependencies
Gets the dictionary of dependent parameters on parameter.
Declaration
protected Dictionary<string, HashSet<string>> ParametersDependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.HashSet<System.String>> |
ParametersExpressionsDependencies
Gets the dictionary of dependent expressions on parameter.
Declaration
protected Dictionary<string, List<Expression>> ParametersExpressionsDependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<Expression>> |
UnnamedExpressions
Gets the collection of unnamed expressions.
Declaration
protected ICollection<Expression> UnnamedExpressions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<Expression> |
Methods
| Improve this Doc View SourceAdd(Expression, ICollection<String>)
Adds an expression to registry.
Declaration
public void Add(Expression expression, ICollection<string> parameters)
Parameters
Type | Name | Description |
---|---|---|
Expression | expression | Expression to add. |
System.Collections.Generic.ICollection<System.String> | parameters | Parameters of the expression. |
Add(NamedExpression, ICollection<String>)
Adds named expression to registry.
Declaration
public void Add(NamedExpression namedExpression, ICollection<string> parameters)
Parameters
Type | Name | Description |
---|---|---|
NamedExpression | namedExpression | Named expression to add. |
System.Collections.Generic.ICollection<System.String> | parameters | Parameters of the expression. |
AddOrUpdate(String, Expression)
Declaration
public void AddOrUpdate(string parameterName, Expression parameterExpression)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | |
Expression | parameterExpression |
AddOrUpdateParameterDependencies(String, ICollection<String>)
Updates parameter dependencies.
Declaration
public void AddOrUpdateParameterDependencies(string parameterName, ICollection<string> dependentParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | Parameter name. |
System.Collections.Generic.ICollection<System.String> | dependentParameters | Dependent parameters. |
Clone()
Clones the registry.
Declaration
public ExpressionRegistry Clone()
Returns
Type | Description |
---|---|
ExpressionRegistry | A clone of registry. |
GetDependentExpressions(String)
Gets expressions that depend on given parameter.
Declaration
public IEnumerable<Expression> GetDependentExpressions(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterName | A parameter name. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Expression> | An enumerable of expressions. |
GetExpression(String)
Gets the expression with given name.
Declaration
public NamedExpression GetExpression(string expressionName)
Parameters
Type | Name | Description |
---|---|---|
System.String | expressionName | Expression name. |
Returns
Type | Description |
---|---|
NamedExpression | A named expression. |
GetExpressionNames()
Gets expression names.
Declaration
public HashSet<string> GetExpressionNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<System.String> | Enumerable of expression names. |