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
21 lines
604 B
C#
21 lines
604 B
C#
using System.Xml.Serialization;
|
|
|
|
namespace sodoff.Schema;
|
|
|
|
[XmlRoot(ElementName = "ItemStateRule", Namespace = "")]
|
|
[Serializable]
|
|
public class ItemStateRule {
|
|
public ItemStateRule() {}
|
|
|
|
public ItemStateRule(ItemStateRule other) {
|
|
Criterias = other.Criterias.Select(c => new ItemStateCriteria(c)).ToList();
|
|
CompletionAction = new CompletionAction(other.CompletionAction);
|
|
}
|
|
|
|
[XmlElement(ElementName = "Criterias")]
|
|
public List<ItemStateCriteria> Criterias;
|
|
|
|
[XmlElement(ElementName = "CompletionAction")]
|
|
public CompletionAction CompletionAction;
|
|
}
|