• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Show / Hide Table of Contents

Method RegisterNotification

RegisterNotification(QueryDataNotificationCallback, EventType, EventDataFilter)

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

Declaration
public void RegisterNotification(QueryDataNotificationCallback callback, EventType eventType, EventDataFilter datafilter)
Parameters
Type Name Description
QueryDataNotificationCallback callback

A delegate to register your custom method with

EventType eventType

Describes whether the event is to be raised on Item Added, Updated or Removed

EventDataFilter datafilter

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

ItemCallback(string key, CacheEventArg e)
{
   ...
}

Then declare your continuous query

ContinuousQuery cQ=new ContinuousQuery(query,Hashtable vals);

Then register your notification callback

cQ.RegisterNotification(new QueryDataNotificationCallback(ItemCallback),EventType.ItemAdded, EventDataFilter.None);
Back to top Copyright © 2017 Alachisoft