using System; using BaseLibRWFile; namespace BaseLibRWFile { public abstract class XMLRW where T : class { private static readonly object obj = new object(); public static T Load(string file) { lock (obj) { return ClsXml.ReadXML(file, typeof(T)) as T; } } public static T Load(string file, Type t) { lock (obj) { return ClsXml.ReadXML(file, t) as T; } } public virtual void Save(string filePath) { ClsXml.WriteXML(this, filePath, this.GetType()); } public virtual void SaveAs(string filePath) { ClsXml.WriteXML(this, filePath, typeof(T)); } public abstract bool CheckIfNormal(); } }