Click or drag to resize
DigitalRuneGameObjectCreateEventT Method
Defines a game object event.

Namespace: DigitalRune.Game
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
public static GameEventMetadata<T> CreateEvent<T>(
	string name,
	string category,
	string description,
	T defaultEventArgs
)
where T : EventArgs

Parameters

name
Type: SystemString
The name.
category
Type: SystemString
The category.
description
Type: SystemString
The description.
defaultEventArgs
Type: T
The default event arguments that are used when the event is raised without custom event arguments.

Type Parameters

T
The type of the event arguments.

Return Value

Type: GameEventMetadataT
The event metadata.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is .
ArgumentExceptionname must not be an empty string.
Remarks
Game object events must be defined using this method before they can be used. Events are identified by name and type. If an event with the given name and type T has already been defined, the metadata of the existing event is returned and the other parameters (category, description and defaultEventArgs) are ignored!
See Also