Click or drag to resize

GameModeClientExtensionsRegisterCallback Method (IGameModeClient, String, Object, MethodInfo)

Registers a callback with the specified name. When the callback is called, the specified methodInfo will be invoked on the specified target.

Namespace:  SampSharp.Core
Assembly:  SampSharp.Core (in SampSharp.Core.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
public static void RegisterCallback(
	this IGameModeClient gameModeClient,
	string name,
	Object target,
	MethodInfo methodInfo


Type: SampSharp.CoreIGameModeClient
The game mode client.
Type: SystemString
The name af the callback to register.
Type: SystemObject
The target on which to invoke the method.
Type: System.ReflectionMethodInfo
The method information of the method to invoke when the callback is called.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGameModeClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also