Table of Contents

Class DiagramElementParam<T>

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

The diagram element parameter.

public class DiagramElementParam<T> : NotifiableObject, INotifyPropertyChangedEx, IDiagramElementParam, IPersistable, INotifyPropertyChanging, INotifyPropertyChanged, IAttributesEntity

Type Parameters

T

Value type.

Inheritance
DiagramElementParam<T>
Implements
Inherited Members
Extension Methods

Constructors

DiagramElementParam()

public DiagramElementParam()

Properties

Attributes

Gets the list of attributes associated with this entity.

public IList<Attribute> Attributes { get; }

Property Value

IList<Attribute>

CanChangeValue

Can change value.

public bool CanChangeValue { get; set; }

Property Value

bool

CanOptimize

The parameter can be used in optimization.

public bool CanOptimize { get; set; }

Property Value

bool

IgnoreOnSave

To ignore when saving.

public bool IgnoreOnSave { get; set; }

Property Value

bool

IsDefault

The default value is specified.

public bool IsDefault { get; }

Property Value

bool

LoadHandler

The parameter value loading handler.

public Func<SettingsStorage, T> LoadHandler { get; set; }

Property Value

Func<SettingsStorage, T>

Name

Parameter name.

public string Name { get; set; }

Property Value

string

NotifyOnChanged

Raise changed event when property is changed.

public bool NotifyOnChanged { get; set; }

Property Value

bool

SaveHandler

The parameter value saving handler.

public Func<T, SettingsStorage> SaveHandler { get; set; }

Property Value

Func<T, SettingsStorage>

Type

Parameter type.

public Type Type { get; }

Property Value

Type

Value

The parameter value.

public virtual T Value { get; set; }

Property Value

T

ValueValidating

Validate the parameter value.

public Func<T, T, bool> ValueValidating { get; set; }

Property Value

Func<T, T, bool>

Methods

Load(SettingsStorage)

Load settings.

public void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

Save(SettingsStorage)

Save settings.

public void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SetBasic(bool)

To set the BasicSettingAttribute attribute for the diagram element parameter.

public DiagramElementParam<T> SetBasic(bool isBasic = true)

Parameters

isBasic bool

Is basic parameter.

Returns

DiagramElementParam<T>

The diagram element parameter.

SetCanOptimize(bool)

To modify CanOptimize.

public DiagramElementParam<T> SetCanOptimize(bool value = true)

Parameters

value bool

Value.

Returns

DiagramElementParam<T>

The diagram element parameter.

SetDisplay(string, string, string, int)

To set the DisplayAttribute attribute for the diagram element parameter.

public DiagramElementParam<T> SetDisplay(string groupName, string displayName, string description, int order)

Parameters

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

DiagramElementParam<T>

The diagram element parameter.

SetEditor<TEditor>(TEditor)

To add the attribute Attribute for the diagram element parameter.

public DiagramElementParam<T> SetEditor<TEditor>(TEditor editor) where TEditor : Attribute

Parameters

editor TEditor

Attribute.

Returns

DiagramElementParam<T>

The diagram element parameter.

Type Parameters

TEditor

Editor type.

SetExpandable(bool)

To set the ExpandableObjectConverter attribute for the diagram element parameter.

public DiagramElementParam<T> SetExpandable(bool expandable)

Parameters

expandable bool

Value.

Returns

DiagramElementParam<T>

The diagram element parameter.

SetNonBrowsable(bool)

To set the BrowsableAttribute attribute for the diagram element parameter.

public DiagramElementParam<T> SetNonBrowsable(bool nonBrowsable = true)

Parameters

nonBrowsable bool

Hidden parameter.

Returns

DiagramElementParam<T>

The diagram element parameter.

SetReadOnly(bool)

To set the ReadOnlyAttribute attribute for the diagram element parameter.

public DiagramElementParam<T> SetReadOnly(bool readOnly = true)

Parameters

readOnly bool

Read-only.

Returns

DiagramElementParam<T>

The diagram element parameter.

SetValueWithIgnoreOnSave(object)

Set value and ignore it on save settings.

public void SetValueWithIgnoreOnSave(object value)

Parameters

value object

Value.

ToString()

public override string ToString()

Returns

string

Events

ValueChanged

The parameter value change event.

public event Action<T> ValueChanged

Event Type

Action<T>

ValueChanging

The parameter value change start event.

public event Action<T, T> ValueChanging

Event Type

Action<T, T>