DiagramElementParam

StockSharp.Diagram

The diagram element parameter.

Inherits: NotifiableObject

Implements: IDiagramElementParam, IAsyncPersistable, INotifyPropertyChanging, INotifyPropertyChanged, IAttributesEntity, IHandledDiagramElementParam

Properties

Attributes
public IList<Attribute> Attributes { get; }
value = diagramElementParam.Attributes

Gets the list of attributes associated with this entity.

CanChangeValue
public bool CanChangeValue { get; set; }
value = diagramElementParam.CanChangeValue
diagramElementParam.CanChangeValue = value

Can change value.

CanOptimize
public bool CanOptimize { get; set; }
value = diagramElementParam.CanOptimize
diagramElementParam.CanOptimize = value

The parameter can be used in optimization.

IgnoreOnSave
public bool IgnoreOnSave { get; set; }
value = diagramElementParam.IgnoreOnSave
diagramElementParam.IgnoreOnSave = value

To ignore when saving.

IsDefault
public bool IsDefault { get; }
value = diagramElementParam.IsDefault

The default value is specified.

LoadHandler
public Func<SettingsStorage, CancellationToken, ValueTask<T>> LoadHandler { get; set; }
value = diagramElementParam.LoadHandler
diagramElementParam.LoadHandler = value

The parameter value loading handler.

Name
public string Name { get; set; }
value = diagramElementParam.Name
diagramElementParam.Name = value

Parameter name.

NotifyOnChanged
public bool NotifyOnChanged { get; set; }
value = diagramElementParam.NotifyOnChanged
diagramElementParam.NotifyOnChanged = value

Raise changed event when property is changed.

SaveHandler
public Func<T, CancellationToken, ValueTask<SettingsStorage>> SaveHandler { get; set; }
value = diagramElementParam.SaveHandler
diagramElementParam.SaveHandler = value

The parameter value saving handler.

Type
public Type Type { get; }
value = diagramElementParam.Type

Parameter type.

Value
public virtual T Value { get; set; }
value = diagramElementParam.Value
diagramElementParam.Value = value

The parameter value.

ValueValidating
public Func<T, T, bool> ValueValidating { get; set; }
value = diagramElementParam.ValueValidating
diagramElementParam.ValueValidating = value

Validate the parameter value.

Methods

LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = diagramElementParam.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = diagramElementParam.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

SetBasic
public DiagramElementParam<T> SetBasic(bool isBasic)
result = diagramElementParam.SetBasic(isBasic)

To set the BasicSettingAttribute attribute for the diagram element parameter.

isBasic
Is basic parameter.

Returns: The diagram element parameter.

SetCanOptimize
public DiagramElementParam<T> SetCanOptimize(bool value)
result = diagramElementParam.SetCanOptimize(value)

To modify CanOptimize.

value
Value.

Returns: The diagram element parameter.

SetDisplay
public DiagramElementParam<T> SetDisplay(string groupName, string displayName, string description, int order)
result = diagramElementParam.SetDisplay(groupName, displayName, description, order)

To set the DisplayAttribute attribute for the diagram element parameter.

groupName
The category of the diagram element parameter.
displayName
The display name.
description
The description of the diagram element parameter.
order
The property order.

Returns: The diagram element parameter.

SetEditor``1
public DiagramElementParam<T> SetEditor<TEditor>(TEditor editor)
result = diagramElementParam.SetEditor(editor)

To add the attribute Attribute for the diagram element parameter.

editor
Attribute.

Returns: The diagram element parameter.

SetExpandable
public DiagramElementParam<T> SetExpandable(bool expandable)
result = diagramElementParam.SetExpandable(expandable)

To set the ExpandableObjectConverter attribute for the diagram element parameter.

expandable
Value.

Returns: The diagram element parameter.

SetNonBrowsable
public DiagramElementParam<T> SetNonBrowsable(bool nonBrowsable)
result = diagramElementParam.SetNonBrowsable(nonBrowsable)

To set the BrowsableAttribute attribute for the diagram element parameter.

nonBrowsable
Hidden parameter.

Returns: The diagram element parameter.

SetReadOnly
public DiagramElementParam<T> SetReadOnly(bool readOnly)
result = diagramElementParam.SetReadOnly(readOnly)

To set the ReadOnlyAttribute attribute for the diagram element parameter.

readOnly
Read-only.

Returns: The diagram element parameter.

SetRequired
public DiagramElementParam<T> SetRequired(bool required)
result = diagramElementParam.SetRequired(required)

Set RequiredAttribute: the parameter cannot be left without a value.

required
Whether the parameter is required.

Returns: The parameter.

SetValueWithIgnoreOnSave
public void SetValueWithIgnoreOnSave(object value)
diagramElementParam.SetValueWithIgnoreOnSave(value)

Set value and ignore it on save settings.

value
Value.
ToString
public override string ToString()
result = diagramElementParam.ToString()

Returns a string representation of the tuple, with values separated by commas.

Returns: A string representing the tuple's values.

Events

ValueChanged
public event Action<T> ValueChanged
diagramElementParam.ValueChanged += handler

The parameter value change event.

ValueChanging
public event Action<T, T> ValueChanging
diagramElementParam.ValueChanging += handler

The parameter value change start event.