Broadcasts a custom application defined event.

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

Syntax

C#
public override void RaiseCustomEvent(
	Object notifId,
	Object data
)
Visual Basic
Public Overrides Sub RaiseCustomEvent ( _
	notifId As Object, _
	data As Object _
)
Visual C++
public:
virtual void RaiseCustomEvent(
	Object^ notifId, 
	Object^ data
) override

Parameters

notifId
Type: System..::..Object
Application specific notification code/id
data
Type: System..::..Object
Application specific data

Remarks

In most of the cases this method's implementation is close to O(1).

Note: If exceptions are enabled through the ExceptionsEnabled setting, this property throws exception incase of failure.

Note: Custom event notifications can not be disabled through configuration.

Examples

The following example demonstrates how to raise a custom application defined event.
CopyC#
NCache.Cache.RaiseCustomEvent(MyNotificationCodes.ConsumeItem,
      new ItemData(DateTime.Now));

Cache.RaiseCustomEvent(MyNotificationCodes.ConsumeItem,
      new ItemData(DateTime.Now));

See Also