using System; using System.Collections.Generic; using DTS.Common.Utilities; using DTS.Common.Utilities.DotNetProgrammingConstructs; namespace DTS.Serialization { //[Serializable] public partial class TestSetup : Exceptional { public partial class Graph : Exceptional { public Graph() { _Name.Value = null; _Version.Value = "1.0.0.0"; Identifier = Guid.NewGuid(); } public void UnSet() { } public List Channels { get => _Channels.Value; set => _Channels.Value = value; } private readonly Property> _Channels = new Property>(typeof(Graph).Namespace + "Graph.Channels", new List(), true); public string Name { get => _Name.Value; set => _Name.Value = value; } private readonly Property _Name = new Property(typeof(Graph).Namespace + ".Graph.Name", "", false); public string HardwareChannelName { get => _HardwareChannelName.Value; set => _HardwareChannelName.Value = value; } private readonly Property _HardwareChannelName = new Property(typeof(Graph).Namespace + ".Graph.HardwareChannelName", "", true); public string DisplayName => _Name.Value + "_" + _HardwareChannelName.Value; public string Version { get => _Version.Value; set => _Version.Value = value; } private readonly Property _Version = new Property(typeof(Graph).Namespace + ".Graph.Version", "", false); public override string ToString() { return Name; } [System.Xml.Serialization.XmlIgnoreAttribute] public bool IsSingleChannelGraph => ((null != Channels) && (1 == Channels.Count)); [System.Xml.Serialization.XmlIgnoreAttribute] public Channel FirstChannel => Channels[0]; [System.Xml.Serialization.XmlIgnoreAttribute] public Test.Module.Channel FirstTestChannel => Channels[0].TestChannel; [System.Xml.Serialization.XmlIgnoreAttribute] public Guid Identifier { get; private set; } } } }