init
This commit is contained in:
102
Common/DTS.Common.Serialization/TestSetup.Graph.cs
Normal file
102
Common/DTS.Common.Serialization/TestSetup.Graph.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DTS.Utilities;
|
||||
using DTS.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 { return _Channels.Value; }
|
||||
set { _Channels.Value = value; }
|
||||
}
|
||||
private Property<List<Channel>> _Channels
|
||||
= new Property<List<Channel>>(typeof(Graph).Namespace + "Graph.Channels", new List<Channel>(), true);
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _Name.Value; }
|
||||
set { _Name.Value = value; }
|
||||
}
|
||||
private Property<string> _Name
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.Name", "", false);
|
||||
|
||||
public string HardwareChannelName
|
||||
{
|
||||
get { return _HardwareChannelName.Value; }
|
||||
set { _HardwareChannelName.Value = value; }
|
||||
}
|
||||
private Property<string> _HardwareChannelName
|
||||
= new Property<string>(typeof(Graph).Namespace + ".Graph.HardwareChannelName", "", true);
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get { return _Name.Value + "_" + _HardwareChannelName.Value; }
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get { return _Version.Value; }
|
||||
set { _Version.Value = value; }
|
||||
}
|
||||
private 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
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((null != Channels) && (1 == Channels.Count));
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Channel FirstChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
return Channels[0];
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public DTS.Serialization.Test.Module.Channel FirstTestChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
return Channels[0].TestChannel;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Xml.Serialization.XmlIgnoreAttribute]
|
||||
public Guid Identifier
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user