Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public override void Save<T>(T obj)
string serailzedObj = SerializeHelper.Serialize(obj);
File.WriteAllText(_PersistenceMediaPath, serailzedObj);
public override T Get<T>()
string stringContent = File.ReadAllText(_PersistenceMediaPath);
if (!String.IsNullOrEmpty(stringContent))
return ((T)SerializeHelper.Deserialize(typeof(T), stringContent));
return default(T);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment