NativeActivityMetadata.RequireExtension 方法

定义

重载

RequireExtension(Type)

指定活动在运行时需要一个指定类型的扩展。Specifies that the activity requires an extension of the specified type at runtime.

RequireExtension<T>()

指定活动在运行时需要一个指定泛型类型的扩展。Specifies that the activity requires an extension of the specified generic type at runtime.

RequireExtension(Type)

指定活动在运行时需要一个指定类型的扩展。Specifies that the activity requires an extension of the specified type at runtime.

public:
 void RequireExtension(Type ^ extensionType);
public void RequireExtension (Type extensionType);
member this.RequireExtension : Type -> unit
Public Sub RequireExtension (extensionType As Type)

参数

extensionType
Type

扩展的类型。The type of the extension.

注解

如果主机无法提供指定类型的扩展,验证将失败。If the host fails to provide an extension of the specified type, validation fails.

适用于

RequireExtension<T>()

指定活动在运行时需要一个指定泛型类型的扩展。Specifies that the activity requires an extension of the specified generic type at runtime.

public:
generic <typename T>
 where T : class void RequireExtension();
public void RequireExtension<T> () where T : class;
member this.RequireExtension : unit -> unit (requires 'T : null)
Public Sub RequireExtension(Of T As Class) ()

类型参数

T

扩展的类型。The type of the extension.

注解

如果主机无法提供指定类型的扩展,验证将失败。If the host fails to provide an extension of the specified type, validation fails.

适用于