public async Task <AccountCode> GenerateAccountCodeAsync(int id) { var account = await _store.Load(id); var token = account.Tokens.Where(t => t.Type == AccountTokenType.Credential).FirstOrDefault(); if (token == null) { return(new AccountCode()); } return(await GenerateAccountCodeWithHashAsync(token.Hash)); }
/// <summary> /// 装载K线数据 /// </summary> /// <param name="accountName"></param> /// <returns></returns> public IAccount Load(string path, string accountName) { return(accountStore.Load(path, accountName)); }