Windows Azure Mobile Services クエリを実行しようとしています (SDK の xamarins monotouch フォークを使用)。
このコードは、シミュレーターでは問題なく動作しますが、デバイスでは爆発します。
this.table.Where (a => a.Sequence == sequence).Where (a => a.Week == week).ToListAsync()
.ContinueWith (t =>
{
this.items = t.Result;
this.tableView.ReloadData ();
IsUpdating = false;
}, scheduler);
私が得るエラーは次のとおりです。
呼び出しのターゲットによって例外がスローされました。---> System.Exception: --aot-only で実行中にメソッド 'System.Linq.jvm.Runner:GetDelegate ()' を JIT コンパイルしようとしています。
それを機能させるために私がなんとかした唯一のことは、where条件を削除することです。これは、(明らかに)必要に応じて結果をフィルタリングしないことを除いて、うまく機能します。
実際の iOS デバイスで動作するようにコードを書き直すにはどうすればよいですか?
更新: table はタイプ * IMobileServiceTable < Activity > *のクラス変数です
week と sequence はどちらもint型です。
アクティビティは POCO クラスです。
public class Activity
{
public int ID {
get;
set;
}
public string Name {
get;
set;
}
public int CaloricRequirementMin {
get;
set;
}
public int CaloricRequirementMax {
get;
set;
}
public string Difficulty {
get;
set;
}
public int PlanId {get;set;}
public string Type {
get;
set;
}
public int Sequence {
get;
set;
}
public int Week {
get;
set;
}
public int SubscriptionActivityId {
get;
set;
}
}
これらが両方とも入力されていることを確認するために再確認しました。
それはシミュレーターで完璧に言います。