Table of Contents

Class DiagramElementParamHelper

Namespace
StockSharp.Diagram
Assembly
StockSharp.Diagram.Core.dll

Extension class for IDiagramElementParam.

public static class DiagramElementParamHelper
Inheritance
DiagramElementParamHelper
Inherited Members

Methods

SetNotifyOnChange<TParam>(TParam, bool)

To modify NotifyOnChanged.

public static TParam SetNotifyOnChange<TParam>(this TParam param, bool value) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

value bool

Value.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

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.