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

Is<TParam, TAttribute>(TParam, Func<TAttribute, bool>)

Determines the specified param has the TAttribute attribute.

public static bool Is<TParam, TAttribute>(this TParam param, Func<TAttribute, bool> condition) where TParam : class, IDiagramElementParam

Parameters

param TParam

DiagramElementParam<T>

condition Func<TAttribute, bool>

Condition.

Returns

bool

Check result.

Type Parameters

TParam

DiagramElementParam<T>

TAttribute

Attribute type.

SetBasic<TParam>(TParam, bool)

To set the Ecng.Common.BasicSettingAttribute attribute for the diagram element parameter.

public static TParam SetBasic<TParam>(this TParam param, bool isBasic = true) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

isBasic bool

Is basic parameter.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

SetDisplay<TParam>(TParam, string, string, string, int)

To set the DisplayAttribute attribute for the diagram element parameter.

public static TParam SetDisplay<TParam>(this TParam param, string groupName, string displayName, string description, int order) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

groupName string

The category of the diagram element parameter.

displayName string

The display name.

description string

The description of the diagram element parameter.

order int

The property order.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

SetEditor<TParam>(TParam, Attribute)

To add the attribute Attribute for the diagram element parameter.

public static TParam SetEditor<TParam>(this TParam param, Attribute editor) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

editor Attribute

Attribute.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

SetExpandable<TParam>(TParam)

To set the ExpandableObjectConverter attribute for the diagram element parameter.

public static TParam SetExpandable<TParam>(this TParam param) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

SetIsParam<TParam>(TParam)

To modify IsParam.

public static TParam SetIsParam<TParam>(this TParam param) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

SetNonBrowsable<TParam>(TParam, bool)

To set the BrowsableAttribute attribute for the diagram element parameter.

public static TParam SetNonBrowsable<TParam>(this TParam param, bool nonBrowsable = true) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

nonBrowsable bool

Hidden parameter.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

The diagram element parameter type.

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.

SetReadOnly<TParam>(TParam, bool)

To set the ReadOnlyAttribute attribute for the diagram element parameter.

public static TParam SetReadOnly<TParam>(this TParam param, bool readOnly = true) where TParam : IDiagramElementParam

Parameters

param TParam

The diagram element parameter.

readOnly bool

Read-only.

Returns

TParam

The diagram element parameter.

Type Parameters

TParam

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.