init
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
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<Channel> Channels
|
||||
{
|
||||
get => _Channels.Value;
|
||||
set => _Channels.Value = value;
|
||||
}
|
||||
private readonly Property<List<Channel>> _Channels
|
||||
= new Property<List<Channel>>(typeof(Graph).Namespace + "Graph.Channels", new List<Channel>(), true);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _Name.Value;
|
||||
set => _Name.Value = value;
|
||||
}
|
||||
private readonly Property<string> _Name
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.Name", "", false);
|
||||
|
||||
public string HardwareChannelName
|
||||
{
|
||||
get => _HardwareChannelName.Value;
|
||||
set => _HardwareChannelName.Value = value;
|
||||
}
|
||||
private readonly Property<string> _HardwareChannelName
|
||||
= new Property<string>(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<string> _Version
|
||||
= new Property<string>(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user