Registers the notifications based on the specified ContinuousQuery .

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 virtual void RegisterCQ(
	ContinuousQuery query
)
Visual Basic
Public Overridable Sub RegisterCQ ( 
	query As ContinuousQuery
)
Visual C++
public:
virtual void RegisterCQ(
	ContinuousQuery^ query
)

Parameters

query
Type: Alachisoft.NCache.Web.Caching..::..ContinuousQuery
ContinuousQuery to register notifications for.

Examples

 Copy imageCopy
string queryString = "SELECT MyApplication.Employee WHERE this.Salary > ?";

Hashtable values = new Hashtable();
values.Add("Salary", 50000);

ContinuousQuery query = new ContinuousQuery(queryString, values);

query.RegisterAddNotification(new ContinuousQueryItemAddedCallback(query_ItemAdded));
query.RegisterUpdateNotification(new ContinuousQueryItemUpdatedCallback(query_ItemUpdated));
query.RegisterRemoveNotification(new ContinuousQueryItemRemovedCallback(query_ItemRemoved));

cache.RegisterCQ(query);

See Also