Class DiagramElementParamHelper
- Namespace
- StockSharp.Diagram
- Assembly
- StockSharp.Diagram.Core.dll
Extension class for IDiagramElementParam.
public static class DiagramElementParamHelper
- Inheritance
-
DiagramElementParamHelper
- Inherited Members
Methods
SetOnValueChangedHandler<TValue>(DiagramElementParam<TValue>, Action<TValue>)
To set the handler to the value change for the diagram element parameter.
public static DiagramElementParam<TValue> SetOnValueChangedHandler<TValue>(this DiagramElementParam<TValue> param, Action<TValue> handler)
Parameters
param
DiagramElementParam<TValue>The diagram element parameter.
handler
Action<TValue>The handler of the diagram element value change.
Returns
- DiagramElementParam<TValue>
The diagram element parameter.
Type Parameters
TValue
The diagram element parameter type.
SetOnValueChangingHandler<TValue>(DiagramElementParam<TValue>, Action<TValue, TValue>)
To set the handler at the start of the value change for the diagram element parameter.
public static DiagramElementParam<TValue> SetOnValueChangingHandler<TValue>(this DiagramElementParam<TValue> param, Action<TValue, TValue> handler)
Parameters
param
DiagramElementParam<TValue>The diagram element parameter.
handler
Action<TValue, TValue>The handler.
Returns
- DiagramElementParam<TValue>
The diagram element parameter.
Type Parameters
TValue
The diagram element parameter type.
SetSaveLoadHandlers<TValue>(DiagramElementParam<TValue>, Func<TValue, SettingsStorage>, Func<SettingsStorage, TValue>)
To set the handler of saving/loading for the diagram element parameter.
public static DiagramElementParam<TValue> SetSaveLoadHandlers<TValue>(this DiagramElementParam<TValue> param, Func<TValue, SettingsStorage> save, Func<SettingsStorage, TValue> load)
Parameters
param
DiagramElementParam<TValue>The diagram element parameter.
save
Func<TValue, SettingsStorage>The handler for the parameter saving.
load
Func<SettingsStorage, TValue>The handler for the parameter loading.
Returns
- DiagramElementParam<TValue>
The diagram element parameter.
Type Parameters
TValue
The diagram element parameter type.