This method registers a custom callback that is fired on change in dataset of a continous query

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
public void RegisterNotification(
	QueryDataNotificationCallback callback,
	EventType eventType,
	EventDataFilter datafilter
)
Visual Basic
Public Sub RegisterNotification ( 
	callback As QueryDataNotificationCallback,
	eventType As EventType,
	datafilter As EventDataFilter
)
Visual C++
public:
void RegisterNotification(
	QueryDataNotificationCallback^ callback, 
	EventType eventType, 
	EventDataFilter datafilter
)

Parameters

callback
Type: Alachisoft.NCache.Web.Caching..::..QueryDataNotificationCallback
A delegate to register your custom method with
eventType
Type: Alachisoft.NCache.Runtime.Events..::..EventType
Describes whether the event is to be raised on Item Added, Updated or Removed
datafilter
Type: Alachisoft.NCache.Runtime.Events..::..EventDataFilter
This enum is to describe when registering an event, upon raise how much data is retrieved from cache when the event is raised

Examples

/// First create an ItemCallback
 Copy imageCopy
ItemCallback(string key, CacheEventArg e)
{
   ...
}
Then declare your continous query
 Copy imageCopy
ContinuousQuery cQ=new ContinuousQuery(query,Hashtable vals);
Then register your notification callback
 Copy imageCopy
cQ.RegisterNotification(new QueryDataNotificationCallback(ItemCallback),EventType.ItemAdded, EventDataFilter.None);

See Also