public static void Register(string filePath) { var xs = new XmlSerializer(typeof(CmrConfig)); using (var fsRead = File.OpenRead(filePath)) { _instance = xs.Deserialize(fsRead) as CmrConfig; } }