Class Parameter
A parameter is a key/value pair used mainly in functions
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public class Parameter : TypedValue
Constructors
Parameter()
Create and empty parameter
Declaration
Parameter(string)
Create a parameter with a name but no value
Declaration
public Parameter(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Parameter(string, string)
Create a named and valued parameter
Declaration
public Parameter(string name, string value)
Parameters
Parameter(string, string, string)
Create a parameter with name value and type
Declaration
public Parameter(string name, string value, string type)
Parameters
Properties
Parent
Declaration
public Parameter Parent { get; set; }
Property Value
name
Declaration
public virtual string name { get; set; }
Property Value
param
Declaration
public virtual List<Parameter> param { get; set; }
Property Value
Methods
AddParameter(Parameter)
Adds the given parameter as sub-parameter
Declaration
public void AddParameter(Parameter newParameter)
Parameters
Clear(bool)
Remove all sub parameters from the given parameters
Declaration
public void Clear(bool deep = false)
Parameters
Type |
Name |
Description |
bool |
deep |
Also remove parenting and parameters in sub parameters
|
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetParameter(string)
Get the first found subparameter with the givne name
Declaration
public Parameter GetParameter(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetParameters(string)
Get the subparameters with the given name
Declaration
public List<Parameter> GetParameters(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
RemoveParameter(Parameter)
Adds the given parameter as sub-parameter
Declaration
public void RemoveParameter(Parameter newParameter)
Parameters
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
implicit operator Parameter(string)
Declaration
public static implicit operator Parameter(string value)
Parameters
Type |
Name |
Description |
string |
value |
|
Returns
Extension Methods