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
TValue 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
CanChangeValue
Can change value.
public bool CanChangeValue { get; set; }
Property Value
CanOptimize
The parameter can be used in optimization.
public bool CanOptimize { get; set; }
Property Value
IgnoreOnSave
To ignore when saving.
public bool IgnoreOnSave { get; set; }
Property Value
IsDefault
The default value is specified.
public bool IsDefault { get; }
Property Value
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
NotifyOnChanged
Raise changed event when property is changed.
public bool NotifyOnChanged { get; set; }
Property Value
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
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
Methods
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
Save(SettingsStorage)
Save settings.
public void Save(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
SetBasic(bool)
To set the BasicSettingAttribute attribute for the diagram element parameter.
public DiagramElementParam<T> SetBasic(bool isBasic = true)
Parameters
isBasicboolIs basic parameter.
Returns
- DiagramElementParam<T>
The diagram element parameter.
SetCanOptimize(bool)
To modify CanOptimize.
public DiagramElementParam<T> SetCanOptimize(bool value = true)
Parameters
valueboolValue.
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
groupNamestringThe category of the diagram element parameter.
displayNamestringThe display name.
descriptionstringThe description of the diagram element parameter.
orderintThe 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
editorTEditorAttribute.
Returns
- DiagramElementParam<T>
The diagram element parameter.
Type Parameters
TEditorEditor type.
SetExpandable(bool)
To set the ExpandableObjectConverter attribute for the diagram element parameter.
public DiagramElementParam<T> SetExpandable(bool expandable)
Parameters
expandableboolValue.
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
nonBrowsableboolHidden 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
readOnlyboolRead-only.
Returns
- DiagramElementParam<T>
The diagram element parameter.
SetValueWithIgnoreOnSave(object)
Set value and ignore it on save settings.
public void SetValueWithIgnoreOnSave(object value)
Parameters
valueobjectValue.
ToString()
public override string ToString()
Returns
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>