public static BUCommon.AccountList BuildAccounts() { string file = "b2app.accounts.xml"; file = System.IO.Path.Combine(BUCommon.ConfigPaths.Prefix, file); var acctlst = new BUCommon.AccountList(); acctlst.load(file); file = "b2app.filecache"; file = System.IO.Path.Combine(BUCommon.ConfigPaths.Prefix, file); BUCommon.FileCache fc = null; if (System.IO.File.Exists(file + ".json")) { fc = BUCommon.FileCache.Load(file + ".json"); } else { if (System.IO.File.Exists(file + ".xml")) { fc = BUCommon.FileCache.Load(file + ".xml"); fc.save(file + ".json"); } else { fc = BUCommon.FileCache.Load(file + ".json"); } } acctlst.filecache = fc; foreach (var a in acctlst) { Load(acctlst, a); } return(acctlst); }