internal static GlobalGuildAccount GetGuildAccount(ulong id) { return(serverAccounts.GetOrAdd(id, (key) => { var newAccount = new GlobalGuildAccount(id); InversionOfControl.Container.GetInstance <JsonDataStorage>().StoreObject(newAccount, Path.Combine(Constants.ServerAccountsFolder, $"{id}.json"), useIndentations: true); return newAccount; })); }
public GlobalGuildAccount GetById(ulong id) { return(serverAccounts.GetOrAdd(id, (key) => { var newAccount = new GlobalGuildAccount(id); _jsonDataStorage.StoreObject(newAccount, Path.Combine(Constants.ServerAccountsFolder, $"{id}.json"), useIndentations: true); return newAccount; })); }
internal static GlobalGuildAccount GetGuildAccount(ulong id) { return(serverAccounts.GetOrAdd(id, (key) => { var newAccount = new GlobalGuildAccount { Id = id, LevelingMsgs = "server", Currency = "Potatoes" }; Configuration.DataStorage.StoreObject(newAccount, Path.Combine(Constants.ServerAccountsFolder, $"{id}.json"), useIndentations: true); return newAccount; })); }