mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 08:18:49 -07:00

.net 8 deprecated BinaryFormatter serialization apart from that proper deep copies are ~10x faster
40 lines
842 B
C#
40 lines
842 B
C#
using System.Diagnostics;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace sodoff.Schema;
|
|
|
|
[XmlRoot(ElementName = "Task", Namespace = "")]
|
|
[Serializable]
|
|
public class Task {
|
|
public Task() {}
|
|
|
|
public Task(Task other) {
|
|
TaskID = other.TaskID;
|
|
Name = other.Name;
|
|
Static = other.Static;
|
|
Completed = other.Completed;
|
|
Failed = other.Failed;
|
|
Payload = other.Payload;
|
|
}
|
|
|
|
[XmlElement(ElementName = "I")]
|
|
public int TaskID;
|
|
|
|
[XmlElement(ElementName = "N")]
|
|
public string Name;
|
|
|
|
[XmlElement(ElementName = "S")]
|
|
public string Static;
|
|
|
|
[XmlElement(ElementName = "C")]
|
|
public int Completed;
|
|
|
|
[XmlElement(ElementName = "F")]
|
|
public bool Failed;
|
|
|
|
[XmlElement(ElementName = "P")]
|
|
public string Payload;
|
|
}
|