Table of Contents

Class ExpressionParameters

Namespace
xFunc.Maths.Expressions.Parameters
Assembly
xFunc.Maths.dll

Strongly typed collection that contains parameters.

public class ExpressionParameters : IEnumerable<Parameter>, IEnumerable, INotifyCollectionChanged
Inheritance
ExpressionParameters
Implements
Inherited Members

Constructors

ExpressionParameters()

Initializes a new instance of the ExpressionParameters class.

public ExpressionParameters()

ExpressionParameters(bool)

Initializes a new instance of the ExpressionParameters class.

public ExpressionParameters(bool initConstants)

Parameters

initConstants bool

if set to true initialize constants.

ExpressionParameters(IEnumerable<Parameter>)

Initializes a new instance of the ExpressionParameters class.

public ExpressionParameters(IEnumerable<Parameter> parameters)

Parameters

parameters IEnumerable<Parameter>

The parameters.

ExpressionParameters(IEnumerable<Parameter>?, bool)

Initializes a new instance of the ExpressionParameters class.

public ExpressionParameters(IEnumerable<Parameter>? parameters, bool initConstants)

Parameters

parameters IEnumerable<Parameter>

The parameters.

initConstants bool

if set to true initialize constants.

Exceptions

ArgumentNullException

parameters is null.

ExpressionParameters(ExpressionParameters)

Initializes a new instance of the ExpressionParameters class.

public ExpressionParameters(ExpressionParameters parameters)

Parameters

parameters ExpressionParameters

The parameters.

Properties

this[string]

Gets or sets the value of variable.

public virtual ParameterValue this[string key] { get; set; }

Parameters

key string

The name of variable.

Property Value

ParameterValue

The value of parameter.

Methods

Add(string, ParameterValue)

Adds the specified element to a set.

public void Add(string key, ParameterValue value)

Parameters

key string

The name of variable.

value ParameterValue

The value of variable.

Add(Parameter)

Adds the specified element to a set.

public void Add(Parameter param)

Parameters

param Parameter

The element.

Exceptions

ArgumentNullException

param is null.

ParameterIsReadOnlyException

The variable is read only.

Clear()

Clears this collection.

public void Clear()

Contains(Parameter)

Determines whether an object contains the specified element.

public virtual bool Contains(Parameter param)

Parameters

param Parameter

The element.

Returns

bool

true if the object contains the specified element; otherwise, false.

ContainsKey(string)

Determines whether an object contains the specified key.

public virtual bool ContainsKey(string key)

Parameters

key string

The name of variable.

Returns

bool

true if the object contains the specified key; otherwise, false.

CreateScoped(ExpressionParameters?)

Creates a new nested scope of parameters.

public static ExpressionParameters CreateScoped(ExpressionParameters? parameters)

Parameters

parameters ExpressionParameters

The instance of the base parameters collection.

Returns

ExpressionParameters

The expression parameters.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public virtual IEnumerator<Parameter> GetEnumerator()

Returns

IEnumerator<Parameter>

An enumerator that can be used to iterate through the collection.

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)

Parameters

args NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Remove(string)

Removes the specified element from this object.

public void Remove(string key)

Parameters

key string

The name of variable.

Exceptions

ArgumentNullException

key is null.

ParameterIsReadOnlyException

The variable is read only.

Remove(Parameter)

Removes the specified element from this object.

public bool Remove(Parameter param)

Parameters

param Parameter

The element.

Returns

bool

true if item was successfully removed from the collection; otherwise, false.

Exceptions

ArgumentNullException

param is null.

ParameterIsReadOnlyException

The variable is read only.

TryGetParameter(string, out Parameter?)

Gets the value of parameter.

public virtual bool TryGetParameter(string key, out Parameter? parameter)

Parameters

key string

The name of parameter.

parameter Parameter

The parameter.

Returns

bool

true if the current collection contains specified parameter, otherwise false.

Events

CollectionChanged

Occurs when the collection changes.

public event NotifyCollectionChangedEventHandler? CollectionChanged

Event Type

NotifyCollectionChangedEventHandler