AspNetCacheProfileAttribute クラス

定義

サービス操作に適用する場合は、構成ファイル内の ASP.NET 出力キャッシュ プロファイルを示します。このプロファイルは、WCF が ASP .NET出力キャッシュ内の操作からの応答をキャッシュするために使用する必要があります。

public ref class AspNetCacheProfileAttribute sealed : Attribute, System::ServiceModel::Description::IOperationBehavior
[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class AspNetCacheProfileAttribute : Attribute, System.ServiceModel.Description.IOperationBehavior
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type AspNetCacheProfileAttribute = class
    inherit Attribute
    interface IOperationBehavior
Public NotInheritable Class AspNetCacheProfileAttribute
Inherits Attribute
Implements IOperationBehavior
継承
AspNetCacheProfileAttribute
属性
実装

次の例は、 AspNetCacheProfileAttribute 属性をサービス操作に適用する方法を示しています。 この場合、"CacheFor60Seconds" という名前のキャッシュ プロファイルが GetCustomer 操作に使用されます

次の構成スニペットは、"CacheFor60Seconds" キャッシュ プロファイルの指定方法を示しています。

<configuration>  
    <system.web>  
      <compilation debug="true" targetFramework="4.0" />  
      <caching>  
        <outputCacheSettings>  
          <outputCacheProfiles>  
            <add name="CacheFor60Seconds" duration="60" varyByParam="format" varyByHeader="Accept" />  
          </outputCacheProfiles>  
        </outputCacheSettings>  
      </caching>  
    </system.web>  
</configuration>  

注釈

出力キャッシュ プロファイルで実行できる設定の種類の詳細については、「ASP.NET Cache Settings」を参照してください。

コンストラクター

名前 説明
AspNetCacheProfileAttribute(String)

指定したキャッシュ プロファイル名を使用して、 AspNetCacheProfileAttribute クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
CacheProfileName

キャッシュ プロファイルの名前を取得します。

TypeId

派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。

(継承元 Attribute)

メソッド

名前 説明
AddBindingParameters(OperationDescription, BindingParameterCollection)

AddBindingParameters(OperationDescription, BindingParameterCollection)の実装。 WCF インフラストラクチャによって使用され、開発者が使用するためのものではありません。

ApplyClientBehavior(OperationDescription, ClientOperation)

ApplyClientBehavior(OperationDescription, ClientOperation) メソッドの実装。 WCF インフラストラクチャによって使用され、開発者が使用するためのものではありません。

ApplyDispatchBehavior(OperationDescription, DispatchOperation)

ApplyDispatchBehavior(OperationDescription, DispatchOperation) メソッドの実装。 WCF インフラストラクチャによって使用され、開発者が使用するためのものではありません。

Equals(Object)

このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
Validate(OperationDescription)

Validate(OperationDescription) メソッドの実装。 WCF インフラストラクチャによって使用され、開発者が使用するためのものではありません。

明示的なインターフェイスの実装

名前 説明
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象