誰でも助けることができますか?51Degrees の無料サービスを Lite バージョンではなくCloud API ( https://51degrees.com/compare-data-options ) で利用したい。
Global.asax を「タブレット」と「モバイル」の表示モードに設定して、使用できるようにしようとしています。
- index.cshtml
- index.tablet.cshtml
- index.mobile.cshtml
以下は、51 Degrees を使用しない場合に機能します。51 Degrees Cloud API を global.asax と統合してタブレット/モバイルをフィルタリングする方法の例を誰かが持っていますか?
https://51degrees.com/Support/Documentation/APIs/Cloud-API/NET-Cloud
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Tablet")
{
ContextCondition = (ctx =>
ctx.Request.UserAgent.IndexOf("iPad", StringComparison.OrdinalIgnoreCase) >= 0 ||
ctx.Request.UserAgent.IndexOf("Android", StringComparison.OrdinalIgnoreCase) >= 0 &&
ctx.Request.UserAgent.IndexOf("Mobile", StringComparison.OrdinalIgnoreCase) <= 0
)
});
ありがとうトミー