protected corpStationMgr(MarketDB marketDB, ItemFactory itemFactory, NodeContainer container, BoundServiceManager manager, WalletManager walletManager, Client client) : base(manager, client) { this.MarketDB = marketDB; this.ItemFactory = itemFactory; this.Container = container; this.WalletManager = walletManager; }
public insuranceSvc(ItemManager itemManager, InsuranceDB db, MarketDB marketDB, SystemManager systemManager, BoundServiceManager manager) : base(manager) { this.DB = db; this.ItemManager = itemManager; this.MarketDB = marketDB; this.SystemManager = systemManager; }
public corpStationMgr(MarketDB marketDB, ItemFactory itemFactory, NodeContainer container, BoundServiceManager manager, WalletManager walletManager) : base(manager, null) { this.MarketDB = marketDB; this.ItemFactory = itemFactory; this.Container = container; this.WalletManager = walletManager; }
public charmgr(CharacterDB db, MarketDB marketDB, ItemFactory itemFactory, WalletManager WalletManager) { this.DB = db; this.MarketDB = marketDB; this.ItemFactory = itemFactory; this.WalletManager = WalletManager; }
public corpStationMgr(ItemDB itemDB, MarketDB marketDB, ItemManager itemManager, TypeManager typeManager, SystemManager systemManager, BoundServiceManager manager) : base(manager) { this.ItemDB = itemDB; this.MarketDB = marketDB; this.ItemManager = itemManager; this.TypeManager = typeManager; this.SystemManager = systemManager; }
public jumpCloneSvc(ItemDB itemDB, MarketDB marketDB, ItemManager itemManager, TypeManager typeManager, SystemManager systemManager, BoundServiceManager manager) : base(manager) { this.ItemDB = itemDB; this.MarketDB = marketDB; this.ItemManager = itemManager; this.TypeManager = typeManager; this.SystemManager = systemManager; }
protected insuranceSvc(ItemManager itemManager, InsuranceDB db, MarketDB marketDB, SystemManager systemManager, BoundServiceManager manager, int stationID) : base(manager) { this.mStationID = stationID; this.DB = db; this.ItemManager = itemManager; this.MarketDB = marketDB; this.SystemManager = systemManager; }
public insuranceSvc(ItemFactory itemFactory, InsuranceDB db, MarketDB marketDB, WalletManager walletManager, MailManager mailManager, BoundServiceManager manager) : base(manager, null) { this.DB = db; this.ItemFactory = itemFactory; this.MarketDB = marketDB; this.WalletManager = walletManager; this.MailManager = mailManager; }
protected jumpCloneSvc(ItemDB itemDB, MarketDB marketDB, ItemFactory itemFactory, SystemManager systemManager, BoundServiceManager manager, WalletManager walletManager, Client client) : base(manager, client) { this.ItemDB = itemDB; this.MarketDB = marketDB; this.ItemFactory = itemFactory; this.SystemManager = systemManager; this.WalletManager = walletManager; }
public jumpCloneSvc(ItemDB itemDB, MarketDB marketDB, ItemFactory itemFactory, SystemManager systemManager, WalletManager walletManager, BoundServiceManager manager) : base(manager, null) { this.ItemDB = itemDB; this.MarketDB = marketDB; this.ItemFactory = itemFactory; this.SystemManager = systemManager; this.WalletManager = walletManager; }
protected insuranceSvc(ItemFactory itemFactory, InsuranceDB db, MarketDB marketDB, WalletManager walletManager, MailManager mailManager, BoundServiceManager manager, int stationID, Client client) : base(manager, client) { this.mStationID = stationID; this.DB = db; this.ItemFactory = itemFactory; this.MarketDB = marketDB; this.WalletManager = walletManager; this.MailManager = mailManager; }
public contractMgr(ContractDB db, ItemDB itemDB, MarketDB marketDB, CharacterDB characterDB, ItemFactory itemFactory, NotificationManager notificationManager, WalletManager walletManager) { this.DB = db; this.ItemDB = itemDB; this.MarketDB = marketDB; this.CharacterDB = characterDB; this.ItemFactory = itemFactory; this.NotificationManager = notificationManager; this.WalletManager = walletManager; }
public repairSvc(RepairDB repairDb, MarketDB marketDb, InsuranceDB insuranceDb, NodeContainer nodeContainer, NotificationManager notificationManager, ItemFactory itemFactory, BoundServiceManager manager, WalletManager walletManager) : base(manager, null) { this.ItemFactory = itemFactory; this.MarketDB = marketDb; this.RepairDB = repairDb; this.InsuranceDB = insuranceDb; this.NotificationManager = notificationManager; this.Container = nodeContainer; this.WalletManager = walletManager; }
protected repairSvc(RepairDB repairDb, MarketDB marketDb, InsuranceDB insuranceDb, NodeContainer nodeContainer, NotificationManager notificationManager, ItemInventory inventory, ItemFactory itemFactory, BoundServiceManager manager, WalletManager walletManager, Client client) : base(manager, client) { this.mInventory = inventory; this.ItemFactory = itemFactory; this.MarketDB = marketDb; this.RepairDB = repairDb; this.InsuranceDB = insuranceDb; this.NotificationManager = notificationManager; this.Container = nodeContainer; this.WalletManager = walletManager; }
async Task UpdateCitidals(CancellationToken stoppingToken) { using var sp = _service.CreateScope(); await using MarketDB db1 = IsTQ ? sp.ServiceProvider.GetService <TQMarketDB>() : sp.ServiceProvider.GetService <CNMarketDB>(); long[] citidals; try { citidals = await this.client.GetAllCitidalIds(stoppingToken); } catch (Exception e) { _logger.LogInformation(e, $"更新建筑物失败 {IsTQ} " + e); return; } var tasks = citidals.Select(p => new { p, task = this.client.GetCitidal(p) }).ToList(); var oldstations = await db1.stations.Where(p => p.stationid > int.MaxValue).ToListAsync(); try { await Task.WhenAll(tasks.Select(p => p.task)); } catch (Exception e) { _logger.LogInformation(e, $"更新建筑物失败 {IsTQ} " + e); return; } foreach (var task in tasks.Where(p => p.task.Result != null)) { var citidalinfo = task.task.Result; var model = oldstations.FirstOrDefault(p => p.stationid == task.p); if (model == null) { model = new stations(); model.stationid = task.p; db1.stations.Add(model); } var name = citidalinfo.Name.Split(" - ")[0]; model.systemid = citidalinfo.Solar_system_id; model.corpid = citidalinfo.Owner_id; // var mod = await db1.evetypes.FirstOrDefaultAsync(p => p.typeID == citidalinfo.Type_id); // var typename = mod?.typeName ?? "玩家建筑物"; model.stationname = citidalinfo.Name; model.typeid = citidalinfo.Type_id; } db1.RemoveRange(db1.stations.Where(p => p.stationid > int.MaxValue).Where(p => !citidals.Contains(p.stationid))); await db1.SaveChangesAsync(stoppingToken); }
public marketProxy(MarketDB db, CharacterDB characterDB, ItemDB itemDB, SolarSystemDB solarSystemDB, ItemFactory itemFactory, CacheStorage cacheStorage, NodeContainer nodeContainer, ClientManager clientManager, NotificationManager notificationManager, WalletManager walletManager) { this.DB = db; this.CharacterDB = characterDB; this.ItemDB = itemDB; this.SolarSystemDB = solarSystemDB; this.CacheStorage = cacheStorage; this.ItemFactory = itemFactory; this.NodeContainer = nodeContainer; this.ClientManager = clientManager; this.NotificationManager = notificationManager; this.WalletManager = walletManager; }
public slash(Logger logger, ItemFactory itemFactory, MarketDB marketDB, CharacterDB characterDB, ItemDB itemDB, NotificationManager notificationManager, WalletManager walletManager) { this.Log = logger.CreateLogChannel("Slash"); this.ItemFactory = itemFactory; this.MarketDB = marketDB; this.CharacterDB = characterDB; this.ItemDB = itemDB; this.NotificationManager = notificationManager; this.WalletManager = walletManager; // register commands this.mCommands["create"] = CreateCmd; this.mCommands["createitem"] = CreateCmd; this.mCommands["giveskills"] = GiveSkillCmd; this.mCommands["giveskill"] = GiveSkillCmd; this.mCommands["giveisk"] = GiveIskCmd; }
protected async Task Update(CancellationToken stoppingToken) { await UpdateCitidals(stoppingToken); using var sp = _service.CreateScope(); await using MarketDB db1 = IsTQ ? sp.ServiceProvider.GetService <TQMarketDB>() : sp.ServiceProvider.GetService <CNMarketDB>(); var regions = db1.regions.AsNoTracking().OrderBy(p => p.regionid).AsAsyncEnumerable(); var stations = await db1.stations.Where(p => p.stationid > int.MaxValue).ToDictionaryAsync(p => p.stationid, p => p.systemid, cancellationToken: stoppingToken); await regions.AsyncParallelForEach(p => UpdateRegion(p, stations, stoppingToken), 3); // foreach (var region in regions) // { // await UpdateRegion(region, stations, stoppingToken); // // // } }
public async Task UpdateSde(bool tq = false) { MarketDB db = tq ? (MarketDB)_tqdb : _cndb; ESIClient esi = tq ? (ESIClient)_tqesi : _esi; var oldgroups = await EntityFrameworkQueryableExtensions.ToListAsync(db.marketgroup); var attr = esi.GetAllAttrs(); var allmarketgroupstask = esi.Get_markets_groupsAsync(); var alltypetask = GetAllTypeAsync(tq); var newmodels = new ConcurrentBag <EVEMarketSite.Model.marketgroup>(); var oldattr = await EntityFrameworkQueryableExtensions.ToListAsync(db.dogma_attributes); foreach (var m in await attr) { var model = oldattr.FirstOrDefault(p => p.attribute_id == m.Attribute_id); if (model == null) { model = new dogma_attributes(); db.dogma_attributes.Add(model); } model.attribute_id = m.Attribute_id; model.name = m.Name; model.description = m.Description; model.default_value = m.Default_value; model.display_name = m.Display_name; model.high_is_good = m.High_is_good; model.icon_id = m.Icon_id; model.published = m.Published; model.stackable = m.Stackable; model.unit_id = m.Unit_id; } List <marketgroup> cnMarketgroups = new List <marketgroup>(); List <evetypes> cntypes = new List <evetypes>(); if (tq) { cnMarketgroups = await _cndb.marketgroup.ToListAsync(); cntypes = await _cndb.evetypes.ToListAsync(); } await Dasync.Collections.ParallelForEachExtensions.ParallelForEachAsync((await allmarketgroupstask).Distinct(), async i => { while (true) { try { var groupinfo_en = esi.Get_markets_groups_market_group_idAsync("en-us", i); Task <Get_markets_groups_market_group_id_ok> groupinfo_cn; if (!tq) { groupinfo_cn = esi.Get_markets_groups_market_group_idAsync("zh", i); } else { var tmp = cnMarketgroups.FirstOrDefault(p => p.marketGroupID == i); if (tmp != null) { groupinfo_cn = Task.FromResult(new Get_markets_groups_market_group_id_ok() { Name = tmp.marketGroupName, Description = tmp.description, }); } else { groupinfo_cn = groupinfo_en; } } await Task.WhenAll(groupinfo_cn, groupinfo_en); _logger.LogDebug($"GetItemMarketGroupInfoV1Async {i}"); var oldmodel = oldgroups.FirstOrDefault(p => p.marketGroupID == i); if (oldmodel == null) { oldmodel = new marketgroup(); oldmodel.marketGroupID = i; newmodels.Add(oldmodel); } oldmodel.marketGroupName_en = groupinfo_en.Result.Name; oldmodel.marketGroupName = groupinfo_cn.Result.Name; oldmodel.description = groupinfo_cn.Result.Description; oldmodel.description_en = groupinfo_en.Result.Description; oldmodel.parentGroupID = groupinfo_en.Result.Parent_group_id; return; } catch (Exception e) { await Task.Delay(TimeSpan.FromSeconds(1)); _logger.LogWarning(e + ""); } } }, MAX_THREAD); db.marketgroup.AddRange(newmodels); _logger.LogDebug($"Save GetMarketItemGroupInfo"); await db.SaveChangesAsync(); _logger.LogDebug($"Save GetMarketItemGroupInfo OK"); await db.SaveChangesAsync(); var oldtypes = await EntityFrameworkQueryableExtensions.ToListAsync(db.evetypes); var oldtypeattr = await EntityFrameworkQueryableExtensions.ToListAsync(db.type_attributes); var newtypes = new ConcurrentBag <evetypes>(); var newtypeattrs = new ConcurrentBag <type_attributes>(); await Dasync.Collections.ParallelForEachExtensions.ParallelForEachAsync(await alltypetask, async i => { try { var groupinfo_en = esi.Get_universe_types_type_idAsync("en-us", i); Task <Get_universe_types_type_id_ok> groupinfo_cn; if (!tq) { groupinfo_cn = esi.Get_universe_types_type_idAsync("zh", i); } else { var tmp = cntypes.FirstOrDefault(p => p.typeID == i); if (tmp != null) { groupinfo_cn = Task.FromResult(new Get_universe_types_type_id_ok() { Name = tmp.typeName, Description = tmp.description, }); } else { groupinfo_cn = groupinfo_en; } } await Task.WhenAll(groupinfo_cn, groupinfo_en); _logger.LogDebug($"GetTypeInfoV3Async {i}"); var oldmodel = oldtypes.FirstOrDefault(p => p.typeID == i); if (oldmodel == null) { oldmodel = new evetypes(); oldmodel.typeID = i; newtypes.Add(oldmodel); } oldmodel.marketGroupID = groupinfo_en.Result.Market_group_id; oldmodel.portionSize = groupinfo_en.Result.Portion_size; oldmodel.published = groupinfo_en.Result.Published; oldmodel.mass = groupinfo_en.Result.Mass; oldmodel.capacity = groupinfo_en.Result.Capacity; oldmodel.iconID = groupinfo_en.Result.Icon_id; oldmodel.volume = groupinfo_en.Result.Volume; oldmodel.typeName_en = groupinfo_en.Result.Name; oldmodel.typeName = groupinfo_cn.Result.Name; oldmodel.description = groupinfo_cn.Result.Description; oldmodel.description_en = groupinfo_en.Result.Description; oldmodel.groupID = groupinfo_en.Result.Group_id; oldmodel.attributes.Clear(); if (groupinfo_cn.Result.Dogma_attributes?.Count > 0) { foreach (var resultDogmaAttribute in groupinfo_cn.Result.Dogma_attributes) { newtypeattrs.Add(new type_attributes() { attribute_id = resultDogmaAttribute.Attribute_id, value = resultDogmaAttribute.Value, type_id = i }); } } } catch (Exception e) { await Task.Delay(TimeSpan.FromSeconds(1)); _logger.LogWarning(e + ""); } }, MAX_THREAD); db.evetypes.AddRange(newtypes); await db.SaveChangesAsync(); db.type_attributes.RemoveRange(db.type_attributes); db.AddRange(newtypeattrs); await db.SaveChangesAsync(); var http = _httpClientFactory.CreateClient("CN"); db.InvMetaTypes.RemoveRange(db.InvMetaTypes); await using var bz2file1 = await http.GetStreamAsync("https://www.fuzzwork.co.uk/dump/latest/invMetaTypes.csv.bz2"); await using var fs = new MemoryStream(); BZip2.Decompress(bz2file1, fs, false); fs.Seek(0, SeekOrigin.Begin); using var textreader = new StreamReader(fs); await textreader.ReadLineAsync(); //ignore 1st var r = await textreader.ReadLineAsync(); while (r != null) { var imp = r.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var newmodel = new invMetaTypes(); newmodel.typeID = int.Parse(imp[0]); if (imp[1] == "None") { newmodel.parentTypeID = null; } else { newmodel.parentTypeID = int.Parse(imp[1]); } if (imp[2] == "None") { newmodel.metaGroupID = null; } else { newmodel.metaGroupID = int.Parse(imp[2]); } db.InvMetaTypes.Add(newmodel); r = await textreader.ReadLineAsync(); //ignore 1st } await db.SaveChangesAsync(); _logger.LogInformation("完成!"); }
private async Task UpdateRegion(regions region, Dictionary <long, int> stations, CancellationToken stoppingToken) { try { if (stoppingToken.IsCancellationRequested) { return; } _logger.LogInformation("开始下载订单: Region: " + region.regionid + $" TQ: {IsTQ}"); var dttoday = MarketDB.ChinaTimeZone.AtStartOfDay(DateTime.Today.ToLocalDateTime().Date); var dtnext = dttoday.Plus(Duration.FromDays(1)); List <Get_markets_region_id_orders_200_ok> neworder; try { neworder = await GetESIOrders((int)region.regionid, stoppingToken); } catch (Exception e) { _logger.LogInformation("下载订单失败: Region: " + region.regionid + $" TQ: {IsTQ} " + e.Message); return; } using var sp = _service.CreateScope(); await using MarketDB db = IsTQ ? sp.ServiceProvider.GetService <TQMarketDB>() : sp.ServiceProvider.GetService <CNMarketDB>(); var currentOrders = await db.current_market.Where(p => p.regionid == region.regionid).ToListAsync(cancellationToken: stoppingToken); _logger.LogInformation("完成下载订单: Region: " + region.regionid + $" TQ: {IsTQ}; APIOrder {neworder.Count()}"); var citidal = currentOrders.Where(p => p.stationid > int.MaxValue).Select(p => p.stationid) .Distinct().ToList(); citidal.AddRange(neworder.Where(p => p.Location_id > int.MaxValue).Select(p => p.Location_id).Distinct()); citidal = citidal.Distinct().Where(stations.ContainsKey).ToList(); var citidaltasks = citidal.Select(p => GetStructOrders(p, stoppingToken)).ToList(); await Task.WhenAll(citidaltasks); var citidalorders = citidaltasks.AsParallel().SelectMany(p => p.Result).AsParallel() .Where(p => stations.ContainsKey(p.Location_id)) .Select(citidaltask => { var orderinfo = new Get_markets_region_id_orders_200_ok() { Location_id = citidaltask.Location_id, Duration = citidaltask.Duration, Is_buy_order = citidaltask.Is_buy_order, Issued = citidaltask.Issued, Min_volume = citidaltask.Min_volume, Order_id = citidaltask.Order_id, Price = citidaltask.Price, Type_id = citidaltask.Type_id, Volume_remain = citidaltask.Volume_remain, Volume_total = citidaltask.Volume_total }; orderinfo.System_id = (int)stations[citidaltask.Location_id]; orderinfo.Range = citidaltask.Range switch { Get_markets_structures_structure_id_200_okRange.Region => Get_markets_region_id_orders_200_okRange.Region, Get_markets_structures_structure_id_200_okRange.Solarsystem => Get_markets_region_id_orders_200_okRange.Solarsystem, Get_markets_structures_structure_id_200_okRange.Station => Get_markets_region_id_orders_200_okRange.Station, Get_markets_structures_structure_id_200_okRange._1 => Get_markets_region_id_orders_200_okRange._1, Get_markets_structures_structure_id_200_okRange._2 => Get_markets_region_id_orders_200_okRange._2, Get_markets_structures_structure_id_200_okRange._3 => Get_markets_region_id_orders_200_okRange._3, Get_markets_structures_structure_id_200_okRange._4 => Get_markets_region_id_orders_200_okRange._4, Get_markets_structures_structure_id_200_okRange._5 => Get_markets_region_id_orders_200_okRange._5, Get_markets_structures_structure_id_200_okRange._10 => Get_markets_region_id_orders_200_okRange._10, Get_markets_structures_structure_id_200_okRange._20 => Get_markets_region_id_orders_200_okRange._20, Get_markets_structures_structure_id_200_okRange._30 => Get_markets_region_id_orders_200_okRange._30, Get_markets_structures_structure_id_200_okRange._40 => Get_markets_region_id_orders_200_okRange._40, _ => orderinfo.Range }; return(orderinfo); }); neworder.AddRange(citidalorders); var allorders = neworder.AsParallel().GroupBy(p => p.Order_id).Select(p => p.First()).ToList(); _logger.LogInformation("完成下载玩家建筑物订单: Region: " + region.regionid + $" TQ: {IsTQ}; "); var alltypes = allorders.Select(p => p.Type_id).Distinct().ToList(); // ConcurrentDictionary<long, current_market> orders = // new ConcurrentDictionary<long, current_market>(currentOrders); var insertorder = new ConcurrentBag <current_market>(); var oldorders = allorders.AsParallel().GroupJoin(currentOrders.AsParallel(), ok => ok.Order_id, market => market.orderid, (p, market) => new { p, m = market.FirstOrDefault() }); oldorders.ForAll(obj => { current_market market; var p = obj.p; if (obj.m == null) { market = new current_market { orderid = p.Order_id, reportedtime = Instant.FromDateTimeOffset(DateTimeOffset.Now) }; insertorder.Add(market); } else { market = obj.m; } market.stationid = p.Location_id; market.typeid = p.Type_id; market.interval = p.Duration; market.minvolume = p.Min_volume; market.volremain = p.Volume_remain; market.issued = Instant.FromDateTimeOffset(p.Issued); market.volenter = p.Volume_total; market.price = p.Price; market.bid = p.Is_buy_order ? 1 : 0; market.range = p.Range.ConvertRange(); market.systemid = p.System_id; market.regionid = region.regionid; }); // Parallel.ForEach(allorders, p => // foreach (var p in allorders) var todayhistsory = await db.market_markethistorybyday.Where(p => p.regionid == region.regionid && alltypes.Contains(p.typeid) && p.date == dttoday.Date).ToDictionaryAsync(p => p.typeid, p => p, cancellationToken: stoppingToken); var realtimehistory = !IsTQ ? await db.evetypes.Where(p => alltypes.Contains(p.typeID)).Select(ip => ip .market_realtimehistory.Where(p => p.regionid == region.regionid && p.date >= dttoday.ToInstant() && p.date < dtnext.ToInstant()).OrderByDescending(o => o.date).First()) .Where(p => p != null).ToDictionaryAsync(p => p.typeid, p => p, cancellationToken: stoppingToken) : null ; foreach (var rt in allorders.AsParallel().GroupBy(p => p.Type_id, (i, oks) => new { Key = i, Value = oks.ToList().AsParallel() })) { var hassellorder = rt.Value.Any(p => p.Is_buy_order == false); var hasbuyorder = rt.Value.Any(p => p.Is_buy_order == true); if (hassellorder) { var price = rt.Value.Where(p => !p.Is_buy_order).Min(o => o.Price); if (!todayhistsory.TryGetValue(rt.Key, out var hisbydate)) { hisbydate = new market_markethistorybyday(); hisbydate.date = LocalDate.FromDateTime(DateTime.Today); hisbydate.regionid = region.regionid; hisbydate.typeid = rt.Key; hisbydate.start = price; db.market_markethistorybyday.Add(hisbydate); } hisbydate.end = price; hisbydate.max = Math.Max(hisbydate.max, price); hisbydate.min = hisbydate.min > 0 ? Math.Min(hisbydate.min, price) : price; } if (!IsTQ && rt.Value.Any()) { market_realtimehistory realtime; realtime = new market_realtimehistory { regionid = region.regionid, typeid = rt.Key, date = Instant.FromDateTimeOffset(DateTimeOffset.Now), buy = hasbuyorder ? rt.Value.Where(p => p.Is_buy_order).Max(p => p.Price) : 0, sell = hassellorder ? rt.Value.Where(p => !p.Is_buy_order).Min(p => p.Price) : 0, buyvol = hasbuyorder ? rt.Value.Where(p => p.Is_buy_order).Sum(p => (long)p.Volume_remain) : 0, sellvol = hassellorder ? rt.Value.Where(p => !p.Is_buy_order).Sum(p => (long)p.Volume_remain) : 0, }; if (realtimehistory.TryGetValue(rt.Key, out var oldrealtime)) { if (Math.Abs(oldrealtime.buy - realtime.buy) < 0.001 && Math.Abs(oldrealtime.sell - realtime.sell) < 0.001 && Math.Abs(oldrealtime.buyvol - realtime.buyvol) < 1 && Math.Abs(oldrealtime.sellvol - realtime.sellvol) < 1 ) { realtime = null; } } if (realtime != null) { db.market_realtimehistory.Add(realtime); } } } var allids = allorders.AsParallel().Select(o => o.Order_id).Distinct().ToList(); var delteids = currentOrders.Select(p => p.orderid).Where(p => !allids.Contains(p)); _logger.LogInformation("开始保存订单: Region: " + region.regionid + $" TQ: {IsTQ}"); await using var trans = await db.Database.BeginTransactionAsync(CancellationToken.None); try { db.current_market.AddRange(insertorder); await db.Database.ExecuteSqlInterpolatedAsync( $"delete from current_market where orderid = any ({delteids.ToList()}) and regionid = {region.regionid};", CancellationToken.None); await db.SaveChangesAsync(CancellationToken.None); await trans.CommitAsync(CancellationToken.None); _logger.LogInformation("完成保存订单: Region: " + region.regionid + $" TQ: {IsTQ}"); } finally { } } catch (Exception e) { _logger.LogError("出现错误" + e); } }
public marketProxy(MarketDB db, CacheStorage cacheStorage) { this.DB = db; this.CacheStorage = cacheStorage; }
public charmgr(CharacterDB db, MarketDB marketDB, ItemManager itemManager) { this.DB = db; this.MarketDB = marketDB; this.ItemManager = itemManager; }