초기 커밋.

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,83 @@
using System;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class Daemon : DataTableBase
{
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
[ReadOnly(true)]
public string Description { get { return $"[{this.Name}] {this.Value}"; } }
public Daemon()
{
}
public Daemon(string name, string value)
{
this.Name = name;
this.Value = value;
}
public Daemon(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
this.Value = node.InnerText;
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name}>{this.Value}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"[{this.Name}] {this.Value}";
}
public override bool Equals(object obj)
{
Daemon other = obj as Daemon;
if (other == null) return false;
if (!this.Name.Equals(other.Name)) return false;
if (!this.Value.Equals(other.Value)) return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}

View File

@@ -0,0 +1,123 @@
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 Mode : DataTableBase
{
public string Name { get; set; } = string.Empty;
public List<Service> Services { get; set; } = new List<Service>();
public List<Network> Networks { get; set; } = new List<Network>();
public List<Daemon> Daemons { get; set; } = new List<Daemon>();
public List<Subject> Subjects { get; set; } = new List<Subject>();
public List<SendSubject> SendSubjects { get; set; } = new List<SendSubject>();
[ReadOnly(true)]
public string Description { get { return $"{this.Name}"; } }
public Mode()
{
}
public Mode(string name)
{
this.Name = name;
}
public Mode(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
XmlNode[] nodes = null;
// Services
nodes = node.GetNodesByName("Service");
foreach (XmlNode item in nodes)
this.Services.Add(new Service(item));
// Networks
nodes = node.GetNodesByName("Network");
foreach (XmlNode item in nodes)
this.Networks.Add(new Network(item));
// Daemons
nodes = node.GetNodesByName("Daemon");
foreach (XmlNode item in nodes)
this.Daemons.Add(new Daemon(item));
// Subjects
nodes = node.GetNodesByName("Subject");
foreach (XmlNode item in nodes)
this.Subjects.Add(new Subject(item));
// SendSubjects
nodes = node.GetNodesByName("SendSubject");
foreach (XmlNode item in nodes)
this.SendSubjects.Add(new SendSubject(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}\">");
// Services
foreach (Service value in this.Services)
sb.Append(value.ToXmlString(indent04));
// Networks
foreach (Network value in this.Networks)
sb.Append(value.ToXmlString(indent04));
// Daemons
foreach (Daemon value in this.Daemons)
sb.Append(value.ToXmlString(indent04));
// Subjects
foreach (Subject value in this.Subjects)
sb.Append(value.ToXmlString(indent04));
// SendSubjects
foreach (SendSubject value in this.SendSubjects)
sb.Append(value.ToXmlString(indent04));
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}";
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class Network : DataTableBase
{
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
[ReadOnly(true)]
public string Description { get { return $"[{this.Name}] {this.Value}"; } }
public Network()
{
}
public Network(string name, string value)
{
this.Name = name;
this.Value = value;
}
public Network(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
this.Value = node.InnerText;
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name}>{this.Value}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"[{this.Name}] {this.Value}";
}
public override bool Equals(object obj)
{
Network other = obj as Network;
if (other == null) return false;
if (!this.Name.Equals(other.Name)) return false;
if (!this.Value.Equals(other.Value)) return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}

View File

@@ -0,0 +1,85 @@
using System;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class SendSubject : DataTableBase
{
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public bool IsChecked { get; set; } = true;
[ReadOnly(true)]
public string Description { get { return $"[{this.Name}] {this.Value}"; } }
public SendSubject()
{
}
public SendSubject(string name, string value)
{
this.Name = name;
this.Value = value;
}
public SendSubject(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
this.Value = node.InnerText;
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name}>{this.Value}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"[{this.Name}] {this.Value}";
}
public override bool Equals(object obj)
{
SendSubject other = obj as SendSubject;
if (other == null) return false;
if (!this.Name.Equals(other.Name)) return false;
if (!this.Value.Equals(other.Value)) return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}

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}";
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class Service : DataTableBase
{
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
[ReadOnly(true)]
public string Description { get { return $"[{this.Name}] {this.Value}"; } }
public Service()
{
}
public Service(string name, string value)
{
this.Name = name;
this.Value = value;
}
public Service(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
this.Value = node.InnerText;
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name}>{this.Value}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"[{this.Name}] {this.Value}";
}
public override bool Equals(object obj)
{
Service other = obj as Service;
if (other == null) return false;
if (!this.Name.Equals(other.Name)) return false;
if (!this.Value.Equals(other.Value)) return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}

View File

@@ -0,0 +1,85 @@
using System;
using System.ComponentModel;
using System.Text;
using System.Xml;
using JWH;
using JWH.DATA;
namespace DDUtilityApp.TIBRENDEZVOUS.DATA
{
public class Subject : DataTableBase
{
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public bool IsChecked { get; set; } = true;
[ReadOnly(true)]
public string Description { get { return $"[{this.Name}] {this.Value}"; } }
public Subject()
{
}
public Subject(string name, string value)
{
this.Name = name;
this.Value = value;
}
public Subject(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
this.Value = node.InnerText;
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
}
}
public string ToXmlString(string indent = "")
{
try
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"{indent}<{this.GetType().Name}>{this.Value}</{this.GetType().Name}>");
return sb.ToString();
}
catch (Exception ex)
{
XLogger.Instance.Fatal(ex);
throw ex;
}
}
public override string ToString()
{
return $"{this.Value}";
}
public override bool Equals(object obj)
{
Subject other = obj as Subject;
if (other == null) return false;
if (!this.Name.Equals(other.Name)) return false;
if (!this.Value.Equals(other.Value)) return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}

View File

@@ -0,0 +1,79 @@
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 TargetServer : DataTableBase
{
public string Name { get; set; }
public List<Mode> Modes { get; set; } = new List<Mode>();
[ReadOnly(true)]
public string Description { get { return $"{this.Name}"; } }
public TargetServer()
{
}
public TargetServer(string name)
{
this.Name = name;
}
public TargetServer(XmlNode node)
{
try
{
node.PropertiesCopyAttribute(this);
XmlNode[] nodes = null;
// Modes
nodes = node.GetNodesByName("Mode");
foreach (XmlNode item in nodes)
this.Modes.Add(new Mode(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}\">");
// Modes
foreach (Mode value in this.Modes)
sb.Append(value.ToXmlString(indent02));
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}";
}
}
}