CompositionDiagramElement
Составной элемент.
Наследует: DiagramElement
Конструкторы
public CompositionDiagramElement(ICompositionModel model)
compositionDiagramElement = CompositionDiagramElement(model)
Инициализирует новый экземпляр CompositionDiagramElement.
- model
- ICompositionModel
Свойства
public string Category { get; set; }
value = compositionDiagramElement.Category
compositionDiagramElement.Category = value
Название группы, включающей элемент диаграммы.
public override string DocUrl { get; set; }
value = compositionDiagramElement.DocUrl
compositionDiagramElement.DocUrl = value
Документация URL.
public IEnumerable<DiagramElement> Elements { get; }
value = compositionDiagramElement.Elements
Элементы
public override bool HasUndoManager { get; }
value = compositionDiagramElement.HasUndoManager
Проверьте, определен ли менеджер undo
public override string IconName { get; }
value = compositionDiagramElement.IconName
Имя ресурса Иконы.
public bool IsLoaded { get; set; }
value = compositionDiagramElement.IsLoaded
compositionDiagramElement.IsLoaded = value
Композитный элемент диаграммы загружен.
public override bool IsUndoRedoing { get; }
value = compositionDiagramElement.IsUndoRedoing
В настоящее время проводится операция undo/redo.
public Exception LastError { get; internal set; }
value = compositionDiagramElement.LastError
compositionDiagramElement.LastError = value
Последняя ошибка.
public DiagramElement LastErrorElement { get; internal set; }
value = compositionDiagramElement.LastErrorElement
compositionDiagramElement.LastErrorElement = value
Последний элемент ошибки.
public ICompositionModel Model { get; set; }
value = compositionDiagramElement.Model
compositionDiagramElement.Model = value
ICompositionModel
public override IEnumerable<IDiagramElementParam> Parameters { get; }
value = compositionDiagramElement.Parameters
Расчетные параметры.
public int SchemaVersion { get; set; }
value = compositionDiagramElement.SchemaVersion
compositionDiagramElement.SchemaVersion = value
Версия схемы.
public override DiagramStrategy Strategy { get; set; }
value = compositionDiagramElement.Strategy
compositionDiagramElement.Strategy = value
Стратегия, к которой прикреплен элемент.
public override Guid TypeId { get; }
value = compositionDiagramElement.TypeId
Тип идентификатора.
Методы
public bool CanRedo()
result = compositionDiagramElement.CanRedo()
Этот предикат истинен, когда можно вызвать Redo.
Возвращает: Проверьте результат.
public bool CanUndo()
result = compositionDiagramElement.CanUndo()
Этот предикат истинен, когда можно вызвать Undo.
Возвращает: Проверьте результат.
public override ValueTask<DiagramElement> CloneAsync(bool cloneSockets, CancellationToken cancellationToken)
result = compositionDiagramElement.CloneAsync(cloneSockets, cancellationToken)
Create a copy of CompositionDiagramElement.
- cloneSockets
- To create copies of connections.
- cancellationToken
- CancellationToken
Возвращает: Copy.
public IEnumerable<DiagramSocket> ConnectedToSockets(DiagramSocket socket)
result = compositionDiagramElement.ConnectedToSockets(socket)
Другие розетки, если эта подключена.
- socket
- DiagramSocket
Возвращает: Подключенные розетки.
protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId)
result = compositionDiagramElement.CreateSocketInstance(dir, socketId)
Создайте новый экземпляр сокета.
public IEnumerable<MarketDepthPanelDiagramElement> FindMarketDepthPanels()
result = compositionDiagramElement.FindMarketDepthPanels()
Найдите всех MarketDepthPanelDiagramElement.
public IEnumerable<Portfolio> FindPortfolios()
result = compositionDiagramElement.FindPortfolios()
Найдите все портфолио в элементах.
public override void Flush(DateTime time)
compositionDiagramElement.Flush(time)
Промывка нетриггерных (корневых) элементов.
public override string GetCategory()
result = compositionDiagramElement.GetCategory()
Получить категорию.
Возвращает: Категория.
public override string GetDescription()
result = compositionDiagramElement.GetDescription()
Описание.
Возвращает: Description.
public override string GetDisplayName()
result = compositionDiagramElement.GetDisplayName()
Отображаемое имя.
Возвращает: Name.
protected override void LoadState(SettingsStorage storage)
compositionDiagramElement.LoadState(storage)
Loads the state of the element other than its parameters; called after the parameters are loaded.
- storage
- Settings storage.
protected override void OnInit()
compositionDiagramElement.OnInit()
Метод вызывается при инициализации элемента диаграммы.
protected override void OnPrepare()
compositionDiagramElement.OnPrepare()
Подготовиться к запуску алгоритма элемента диаграммы.
protected override ValueTask OnPrepareAsync(CancellationToken cancellationToken)
result = compositionDiagramElement.OnPrepareAsync(cancellationToken)
Resolves what the element needs from asynchronous sources (securities, underlying assets, derivatives) before the start, so that value processing stays synchronous. Called after OnPrepare.
- cancellationToken
- Cancellation token.
Возвращает: ValueTask
protected override void OnProcess(DateTime time, IDictionary<DiagramSocket, DiagramSocketValue> values, DiagramSocketValue source)
compositionDiagramElement.OnProcess(time, values, source)
Метод вызывается при обработке новых поступающих значений.
- time
- Время.
- values
- Ценности.
- source
- Исходное значение.
protected override void OnReseted()
compositionDiagramElement.OnReseted()
Он вызывается из метода Reset.
protected override void OnSocketConnected(DiagramSocket socket, DiagramSocket source)
compositionDiagramElement.OnSocketConnected(socket, source)
Метод вызывается при подписке на обработку выходных значений элемента диаграммы.
- socket
- Сокет элемента диаграммы.
- source
- Сокет элемента исходной диаграммы.
protected override void OnSocketDisconnected(DiagramSocket socket, DiagramSocket source)
compositionDiagramElement.OnSocketDisconnected(socket, source)
Метод вызывается при отписке от обработки выходных значений элемента диаграммы.
- socket
- Сокет элемента диаграммы.
- source
- Сокет элемента исходной диаграммы.
protected override void OnStart(DateTime time)
compositionDiagramElement.OnStart(time)
Метод вызывается в начале алгоритма элемента диаграммы.
protected override void OnStop()
compositionDiagramElement.OnStop()
Метод вызывается при остановке алгоритма элемента диаграммы.
protected override void OnUnInit()
compositionDiagramElement.OnUnInit()
Метод вызывается при деинициализации элемента диаграммы.
protected void RaiseElementAdded(DiagramElement element)
compositionDiagramElement.RaiseElementAdded(element)
Вызовите ElementAdded.
- element
- DiagramElement
protected void RaiseElementRemoved(DiagramElement element)
compositionDiagramElement.RaiseElementRemoved(element)
Вызовите ElementRemoved.
- element
- DiagramElement
protected override void RaiseParameterValueChanged(string parameterName)
compositionDiagramElement.RaiseParameterValueChanged(parameterName)
Чтобы вызвать событие ParameterValueChanged.
- parameterName
- Имя параметра.
protected void RaiseStrategyChanged()
compositionDiagramElement.RaiseStrategyChanged()
Вызовите StrategyChanged.
public void Redo()
compositionDiagramElement.Redo()
Восстановите состояние некоторых моделей после текущего состояния.
public void ResumeUndoManager()
compositionDiagramElement.ResumeUndoManager()
Возобновить работу менеджера отмены/повтора для модели.
protected override void SaveState(SettingsStorage storage)
compositionDiagramElement.SaveState(storage)
Saves the state of the element other than its parameters.
- storage
- Settings storage.
protected void SetTypeId(Guid typeId)
compositionDiagramElement.SetTypeId(typeId)
TypeId
- typeId
- TypeId
public void SuspendUndoManager()
compositionDiagramElement.SuspendUndoManager()
Приостановить работу менеджера отмены/повтора для модели.
public void Undo()
compositionDiagramElement.Undo()
Восстановите состояние некоторых моделей до текущего состояния.
public void UpdateTypeId(Guid? id)
compositionDiagramElement.UpdateTypeId(id)
Обновите TypeId для элементов композиции.
- id
- Новое значение для TypeId. Может быть.
События
public event Action Changed
compositionDiagramElement.Changed += handler
Событие изменения схемы составного элемента.
public event Action<DiagramElement> ElementAdded
compositionDiagramElement.ElementAdded += handler
Добавлен дочерний элемент.
public event Action<DiagramElement> ElementRemoved
compositionDiagramElement.ElementRemoved += handler
Дочерний элемент удален.
public event Action StrategyChanged
compositionDiagramElement.StrategyChanged += handler
Поднимается при изменении стратегии.