ezet / evelib

Eve Online Library.NET is an open source C# wrapper for CCPs Eve Online API and other popular Eve Online APIs.
Apache License 2.0
72 stars 36 forks source link

DynamicCrest: No definition for 'GetAwaiter' #99

Closed KrisQuack closed 1 year ago

KrisQuack commented 8 years ago

Hi, Im getting the below error with the below set of code, It is erroring on the 'alliancelookup' line, I'm not sure what i'm doing wrong but I couldn't see anything myself. (the code is to get an alliance id number from the ticker)

DynamicCrest crest = new DynamicCrest();
var root = await crest.GetAsync(crest.Host);
var alliancelookup = await (await root.GetAsync(r => r.alliances)).First(i => i.shortName == e.GetArg("allianceticker").ToUpper());
allianceid = alliancelookup.id;

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Dynamic.ExpandoObject' does not contain a definition for 'GetAwaiter' at CallSite.Target(Closure , CallSite , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at ***.Program.<>c.<

b__2_10>d.MoveNext() in C:\Users---\Documents\Visual Studio 2015\Projects------\Program.cs:line 95