public void Deserialize(string jsonData) { if (!initialized) { throw new InvalidOperationException("Not initialized!"); } EngineSerializerData data = jsonData.Deserialize <EngineSerializerData>(); Restore(data); data.Dispose(); }
public void Restore(EngineSerializerData data) { if (!initialized) { throw new InvalidOperationException("Not initialized!"); } for (int i = 0; i < ValueWrappers.Count; i++) { ValueWrappers.Array[i].Restore(data.ValueData.Array[i]); } }
public string Serialize() { if (!initialized) { throw new InvalidOperationException("Not initialized!"); } EngineSerializerData data = new EngineSerializerData(ValueWrappers); string str = data.Serialize(); data.Dispose(); return(str); }