Method RaiseCustomEvent
RaiseCustomEvent(Object, Object)
Broadcasts a custom application defined event.
Declaration
public override void RaiseCustomEvent(object notifId, object data)
Parameters
Type | Name | Description |
---|---|---|
System.Object | notifId | Application specific notification code/id |
System.Object | data | Application specific data |
Overrides
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.
NCache.Cache.RaiseCustomEvent(MyNotificationCodes.ConsumeItem,
new ItemData(DateTime.Now));
Cache.RaiseCustomEvent(MyNotificationCodes.ConsumeItem,
new ItemData(DateTime.Now));