Class MethodExtensions
The method extension to provide helper functions for List operations
Inheritance
System.Object
MethodExtensions
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
public static class MethodExtensions
Methods
| Improve this Doc View SourceAddItem(List<Variable>, Variable)
Add an item to the current List<Variables> element (ContextValues, Global). If the variable of the same name exists, it will be replaced.
Declaration
public static void AddItem(this List<Variable> this, Variable v)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Variable> | this | The working List<Variables> element |
Variable | v | The Variable to be added. |
AddItem(List<Variable>, String, String)
Add an item to the current List<Variables> element (ContextValues, Global). If the variable of the same name exists, it will be replaced.
Declaration
public static void AddItem(this List<Variable> this, string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Variable> | this | the working List<Variables> element |
System.String | name | Name of the variable |
System.String | value | Value of the variable |
Item(List<Variable>, String)
Get the value of an variable by it's given name from a List<Variables> element. If the item does not exits, a null value will return;
Declaration
public static string Item(this List<Variable> this, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Variable> | this | |
System.String | name |
Returns
Type | Description |
---|---|
System.String |
RemoveItem(List<Variable>, String)
Method extension for ContextValues and Global
Declaration
public static void RemoveItem(this List<Variable> this, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<Variable> | this | The working List<Variables> |
System.String | name | The name of the parameter. |