/// <summary> /// Get account data fot the account id.<para /> /// If not exited, create it new. /// </summary> /// <param name="id">account id</param> /// <returns>account data</returns> public static AccountData GetAccountData(long id) { AccountData data; lock (storeLocker) { if (store.TryGetValue(id, out data)) return data; data = new AccountData(id); store.Add(id, data); return data; } }
/// <summary> /// Store data for an account. /// </summary> /// <param name="data">storing data</param> public static void SetAccountData(AccountData data) { lock (storeLocker) { store[data.AccountId] = data; } }
private void GetAccountData() { _adata = AccountDataStore.GetAccountData(_userId); }