초기 커밋.

This commit is contained in:
2025-02-03 11:02:48 +09:00
parent a7d46f415f
commit fe9aa0799f
2334 changed files with 674826 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class Server : DataTableBase
{
public string Name { get; set; } = string.Empty;
public List<TargetServer> TargetServers { get; set; } = new List<TargetServer>();
[ReadOnly(true)]
public string Description { get { return $"{this.Name}"; } }
public Server()
{
}
public Server(string name)
{
this.Name = name;
}
public Server(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
XmlNode[] nodes = null;
// TargetServers
nodes = node.GetNodesByName("TargetServer");
foreach (XmlNode item in nodes)
this.TargetServers.Add(new TargetServer(item));
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
string indent02 = $"{indent} ";
string indent04 = $"{indent02} ";
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name} Name=\"{this.Name}\">");
// TargetServers
sb.AppendLine($"{indent02}<TargetServers>");
foreach (TargetServer value in this.TargetServers)
sb.Append(value.ToXmlString(indent04));
sb.AppendLine($"{indent02}</TargetServers>");
sb.AppendLine($"{indent}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"{this.Name}";
}
}
}