Stardew_Valley_Mods/GeneralMods/StardustCore/Serialization/SerializerDataNode.cs

31 lines
1.1 KiB
C#
Raw Normal View History

using StardewValley;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StardustCore.Serialization
{
public class SerializerDataNode
{
public delegate Item ParsingFunction(string data);
public delegate void SerializingFunction(Item item);
2017-09-14 08:11:05 +08:00
public delegate void SerializingToContainerFunction(Item item, string s);
public delegate void WorldParsingFunction(Item obj);
public SerializingFunction serialize;
2017-09-14 08:11:05 +08:00
public SerializingToContainerFunction serializeToContainer;
public ParsingFunction parse;
public WorldParsingFunction worldObj;
2017-09-14 08:11:05 +08:00
public SerializerDataNode(SerializingFunction serializeFunction, ParsingFunction parsingFunction, WorldParsingFunction worldObjectParsingFunction, SerializingToContainerFunction containerSerializationFunction)
{
serialize = serializeFunction;
parse = parsingFunction;
2017-09-14 08:11:05 +08:00
worldObj = worldObjectParsingFunction;
serializeToContainer = containerSerializationFunction;
}
}
}