robhruska / CalendarToSlack

Grabs calendar data from Outlook and sets Slack presence to Away when events occur.
7 stars 1 forks source link

Cast JValue to bool #23

Closed robhruska closed 6 years ago

robhruska commented 6 years ago

Trying to fix

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '!' cannot be applied to operand of type 'Newtonsoft.Json.Linq.JValue'
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at CalendarToSlack.Http.HttpServer.HandleRequest(HttpListenerContext context) in C:\Users\rob\Projects\CalendarToSlack\CalendarToSlack\Http\HttpServer.cs:line 125