These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
[EveLib] A .NET library for EveXML, CREST, EveCentral, and more
Developer of EveLib and EveAuthUtility
var marketType = (await crest.GetRoot().QueryAsync(r => r.MarketTypes)).Items.Single(i => i.Type.Name == "Plagioclase"); var itemType = await crest.LoadAsync(marketType.Type); var marketGroup = await crest.LoadAsync(marketType.MarketGroup); var itemIcon = await crest.LoadImageAsync(marketType.Type.Icon);
MarketTypeInformation GetMarketTypeInformation(MarketTypeCollection.Item marketType) { MarketTypeInformation info = new MarketTypeInformation(); var itemType = eveCrest.LoadAsync(marketType.Type); var marketGroup = eveCrest.LoadAsync(marketType.MarketGroup); var itemIcon = eveCrest.LoadImageAsync(marketType.Type.Icon); while (itemType.IsCompleted == false || marketGroup.IsCompleted == false || itemIcon.IsCompleted == false) ; info.itemType = itemType.Result; info.marketGroup = marketGroup.Result; using (var ms = new MemoryStream(itemIcon.Result)) { info.icon = Image.FromStream(ms); } return (info); }
public async Task MarketTypeInformation GetMarketTypeInformationAsync(MarketTypeCollection.Item marketType){ var info = new MarketTypeInformation(); var itemType = eveCrest.LoadAsync(marketType.Type); var marketGroup = eveCrest.LoadAsync(marketType.MarketGroup); var itemIcon = eveCrest.LoadImageAsync(marketType.Type.Icon); using (var ms = new MemoryStream(await itemIcon)) { info.icon = Image.FromStream(ms); } info.itemType = await itemType; info.marketGroup = await marketGroup; return info;} public async void DoStuffAsync(){ var marketTypeInfo = GetMarketTypeInformationAsync(); // //do stuff here that doesn't require the value/result of marketTypeInfo // // //await for the result // var marketTypeInfoResult = await marketTypeInfo;}
public async Task GetIcon() { var item = (await crest.GetRoot().QueryAsync(r => r.MarketTypes)).Items.First(); var icon = await crest.LoadImageAsync(item.Type.Icon);}
eveCrest = new EveCrest();From my log text...Creating EveCrest object.Exception: System.MissingMethodException: Method not found: 'System.String eZet.EveLib.Core.Config.get_AppData()'. at eZet.EveLib.EveCrestModule.RequestHandlers.CachedCrestRequestHandler..ctor(ISerializer serializer) at eZet.EveLib.EveCrestModule.EveCrest..ctor() at EveCrestContest.frmMarketItems.frmMarketItems_Shown(Object sender, EventArgs e) in C:\EveCrestContest v1.0.0.4\EveCrestContest\frmMarketItems.cs:line 49
Creating EveCrest object.Exception: System.MissingFieldException: Field not found: 'eZet.EveLib.Core.Config.Separator'. at eZet.EveLib.EveCrestModule.RequestHandlers.CachedCrestRequestHandler..ctor(ISerializer serializer) at eZet.EveLib.EveCrestModule.EveCrest..ctor() at EveCrestContest.frmMarketItems.frmMarketItems_Shown(Object sender, EventArgs e) in D:\EveCrestContest v1.0.0.4\EveCrestContest\frmMarketItems.cs:line 49