HttpApplication.GetVaryByCustomString(HttpContext, String) メソッド

定義

VaryByCustom プロパティのアプリケーション全体にわたる実装を提供します。

public:
 virtual System::String ^ GetVaryByCustomString(System::Web::HttpContext ^ context, System::String ^ custom);
public virtual string GetVaryByCustomString (System.Web.HttpContext context, string custom);
abstract member GetVaryByCustomString : System.Web.HttpContext * string -> string
override this.GetVaryByCustomString : System.Web.HttpContext * string -> string
Public Overridable Function GetVaryByCustomString (context As HttpContext, custom As String) As String

パラメーター

context
HttpContext

現在の Web 要求に関する情報を保持している HttpContext オブジェクト。

custom
String

現在の要求への応答に使用するキャッシュされた応答を指定するカスタム文字列。

戻り値

String

custom パラメーターの値が "browser" の場合は、ブラウザーの Type。それ以外の場合は null

注釈

現在の要求に基づいてカスタムの vary-by 値を計算するための新しいメソッドをオーバーライド GetVaryByCustomString して追加できます。 実装では、認識されないカスタム値の基底クラスを呼び出す必要があります。 詳細については、「 方法: カスタム文字列を使用してページのバージョンをキャッシュする」を参照してください。

適用対象

こちらもご覧ください