sodoff/src/Schema/ItemStateRule.cs
Spirtix dc303d871e mission deep copy
.net 8 deprecated BinaryFormatter serialization
apart from that proper deep copies are ~10x faster
2025-06-27 22:37:58 +02:00

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