匯出 (0) 列印
全部展開

AddItemLevelCallback 方法 (String, DataCacheOperations, DataCacheNotificationCallback, String)

為儲存在區域中的指定項目中發生的快取作業新增快取通知回呼。並未在 Windows Azure Shared Caching 中支援。

命名空間:  Microsoft.ApplicationServer.Caching
組件:  Microsoft.ApplicationServer.Caching.Client (在 Microsoft.ApplicationServer.Caching.Client.dll 中)

public DataCacheNotificationDescriptor AddItemLevelCallback(
	string key,
	DataCacheOperations filter,
	DataCacheNotificationCallback clientCallback,
	string region
)

參數

key
型別:System..::..String
用來在快取中儲存物件時使用的金鑰。
filter
型別:Microsoft.ApplicationServer.Caching..::..DataCacheOperations
會觸發快取通知的快取作業類型。
clientCallback
型別:Microsoft.ApplicationServer.Caching..::..DataCacheNotificationCallback
您想要在通知發生時叫用的方法名稱。
region
型別:System..::..String
儲存物件的區域名稱。

Only item operations AddItem, ReplaceItem, and RemoveItem can trigger cache notifications with item-level callbacks. Specifying region operations in the filter parameter will cause an exception.

Use the DataCacheOperations enumeration in the filter parameter to specify what type of item operations you want to trigger cache notifications. Select more than one enumeration by separating the enumerations with the binary OR operator to perform a bitwise OR. To do this, use the | character in C#, and the Or operator in Visual Basic.

The clientCallback method you invoke with the cache notification must accept the same parameters as the DataCacheNotificationCallback delegate.

社群新增項目

新增
顯示:
© 2015 Microsoft