namespace StockSharp.Diagram; using System.Drawing; /// /// Node. /// public interface ICompositionModelNode : ICloneable { /// /// Key. /// string Key { get; set; } /// /// /// DiagramElement Element { get; set; } /// /// Location. /// PointF Location { get; set; } /// /// Type id. /// Guid TypeId { get; set; } /// /// Figure id. /// string Figure { get; set; } /// /// Custom text. /// string Text { get; set; } } /// /// Dummy implementation of . /// public class DummyCompositionModelNode : ICompositionModelNode { /// public string Key { get; set; } /// public DiagramElement Element { get; set; } /// public PointF Location { get; set; } /// public Guid TypeId { get; set; } /// public string Figure { get; set; } /// public string Text { get; set; } object ICloneable.Clone() { if (Element is null) throw new InvalidOperationException(LocalizedStrings.ElementNotLoaded.Put(Text)); return new DummyCompositionModelNode { Key = Key, Element = Element.Clone(), Location = Location, TypeId = TypeId, Figure = Figure, Text = Text, }; } /// public override string ToString() => Element?.ToString() ?? base.ToString(); }