Raises the NewEvent event.

Namespace:  LeCouteauSuisse.API
Assembly:  LeCouteauSuisseAPI (in LeCouteauSuisseAPI.dll) Version: 1.0.0.2 (1.0.0.2)

Syntax

C#
protected virtual void OnNewEvent(
	GeneratorEvent generatorEvent
)
Visual Basic (Declaration)
Protected Overridable Sub OnNewEvent ( _
	generatorEvent As GeneratorEvent _
)
Visual C++
protected:
virtual void OnNewEvent(
	GeneratorEvent^ generatorEvent
)

Parameters

generatorEvent
Type: LeCouteauSuisse.API..::.GeneratorEvent
The new event to send to the service. This event can derive from the base class GeneratorEvent.

Examples

Here is an sample of sending a new event of the TimerGenerator :
CopyC#
// we pass some arguments in an object array when creating a TimerEvent class.
Object[] args = new Object[2];

// first argument of a TimerEvent class
args[0] = data;

// second argument of a TimerEvent class
args[1] = delay;

// create the new TimerEvent class
TimerEvent eventArgs = (TimerEvent)context.GetNewGeneratorEvent(typeof(TimerEvent), args);

// send event to the service
base.OnNewEvent(eventArgs);

See Also