Class Parameter
A parameter is a key/value pair used mainly in functions
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public class Parameter : TypedValue, ICloneable
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, int)
Adds the given parameter as sub-parameter
Declaration
public void AddParameter(Parameter newParameter, int position = -1)
Parameters
Type |
Name |
Description |
Parameter |
newParameter |
|
int |
position |
Position where the parameter will be added. Default -1 means it will be added at the end
|
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
|
Clone()
Clones the parameter and all its sub-parameters
Declaration
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
FixParentship()
Fix the parenting of all sub-parameters (after deserialization for example)
Declaration
public void FixParentship()
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
Implements
Extension Methods