Share via


MonoPInvokeCallbackAttribute(Type) Constructor

Definición

Constructor para MonoPInvokeCallbackAttribute.

public MonoPInvokeCallbackAttribute (Type t);
new ObjCRuntime.MonoPInvokeCallbackAttribute : Type -> ObjCRuntime.MonoPInvokeCallbackAttribute

Parámetros

t
Type

El tipo del delegado que nos llamará de vuelta.

Comentarios

Debe especificar el tipo del delegado al que se llamará a este código. En el ejemplo siguiente se muestra el escenario en el que se usa:

using System;
	delegate void DrawPatternCallback (IntPtr voidptr, IntPtr cgcontextref);

	º [MonoPInvokeCallback (typeof (DrawPatternCallback))]
	static void DrawCallback (IntPtr voidptr, IntPtr cgcontextptr)
	{
		// This method is called from the C library
	}

Se aplica a