Table of Contents

Method CheckBindMethods

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

CheckBindMethods(Type, Type, IDictionary<string, List<MethodInfo>>?, Func<MethodInfo, MethodInfo?, object?, bool>?, object?)

Check the binding of the method set, i.e. whether the method of the staticType is missing from the objectType (检查方法集的绑定,即在 objectType 中是否缺少 staticType 的方法). e.g. VectorTraitsBase.Statics and VectorTraitsAbstract . It has the interfaceMethodsDictionary parameter.

public static int CheckBindMethods(Type staticType, Type objectType, IDictionary<string, List<MethodInfo>>? interfaceMethodsDictionary, Func<MethodInfo, MethodInfo?, object?, bool>? onMissed = null, object? userdata = null)

Parameters

staticType Type

The type of a static class (静态类的类型).

objectType Type

The type of a object class (对象类的类型).

interfaceMethodsDictionary IDictionary<string, List<MethodInfo>>

The methods of interface (接口类型的方法集合). If it is not null, the staticType is checked in the scope of the method set of the interface (如果它非空,则在接口的方法集范围内检查 staticType ).

onMissed Func<MethodInfo, MethodInfo, object, bool>

The callback function for finding a missed method (找到未命中方法时的回调函数). Prototype: bool isIgnore = onMissed(MethodInfo methodStatic, MethodInfo? methodInterface, object? userdata). If it is null, OnMissed_Default(MethodInfo, MethodInfo?, object?) will be used.

userdata object

The userdata.

Returns

int

Returns the number of missed methods. Specifically, the number of times when onMissed returns false (返回未命中方法的个数。具体来说,是 onMissed 返回false的次数).

CheckBindMethods(Type, Type, Type?, Func<MethodInfo, MethodInfo?, object?, bool>?, object?)

Check the binding of the method set, i.e. whether the method of the staticType is missing from the objectType (检查方法集的绑定,即在 objectType 中是否缺少 staticType 的方法). e.g. VectorTraitsBase.Statics and VectorTraitsAbstract .

public static int CheckBindMethods(Type staticType, Type objectType, Type? interfaceType, Func<MethodInfo, MethodInfo?, object?, bool>? onMissed = null, object? userdata = null)

Parameters

staticType Type

The type of a static class (静态类的类型).

objectType Type

The type of a object class (对象类的类型).

interfaceType Type

The type of interface (接口的类型). If it is not null, the staticType is checked in the scope of the method set of the interface (如果它非空,则在接口的方法集范围内检查 staticType ).

onMissed Func<MethodInfo, MethodInfo, object, bool>

The callback function for finding a missed method (找到未命中方法时的回调函数). Prototype: bool isIgnore = onMissed(MethodInfo methodStatic, MethodInfo? methodInterface, object? userdata). If it is null, OnMissed_Default(MethodInfo, MethodInfo?, object?) will be used.

userdata object

The userdata.

Returns

int

Returns the number of missed methods. Specifically, the number of times when onMissed returns false (返回未命中方法的个数。具体来说,是 onMissed 返回false的次数).