Everything worked fine (except for the dependency resolution) prior to upgrading to 103.0.0 today. Now I'm receiveing an InvalidCastException when defining a type for the ExecuteAsync method.
Here is the response received when not using a type with ExecuteAsync:
{"timestamp":1334626127,"iat":71,"iah":0,"act":0,"mode":1,"sp":60,"act_sp":60,"hold":0,"fan":0,"oat":64,"oah":42,"wind":6,"solar":0,"door":0,"relay_w2":0,"relay_y2":0,"in1":1,"in2":1,"in3":1}
Class I'm using as the type:
public class Raw
{
public DateTime timestamp { get; set; } // unix timestamp
public int iat { get; set; }
public int iah { get; set; }
public int act { get; set; }
public int mode { get; set; }
public int sp { get; set; }
public int act_sp { get; set; }
public int hold { get; set; }
public int fan { get; set; }
public int oat { get; set; }
public int oah { get; set; }
public int wind { get; set; }
public int solar { get; set; }
public int door { get; set; }
public int relay_w2 { get; set; }
public int relay_y2 { get; set; }
public int in1 { get; set; }
public int in2 { get; set; }
public int in3 { get; set; }
public readonly DateTime Received;
public Raw()
{
Received = DateTime.Now;
}
}
And code for retrieving the response:
public void RequestData()
{
var request = new RestRequest();
request.Resource = "v2";
request.RequestFormat = DataFormat.Json;
request.Method = Method.GET;
request.AddParameter( "action", "data" );
client.ExecuteAsync<Raw>( request, MyCallBack );
}
private void MyCallBack( IRestResponse<Raw> response, RestRequestAsyncHandle handle )
{
// do work
}