System.RuntimeTypeHandle.SatisfiesConstraints C# (CSharp) Method

SatisfiesConstraints() private method

private SatisfiesConstraints ( RuntimeTypeHandle typeContext, RuntimeTypeHandle methodContext, RuntimeTypeHandle toType ) : bool
typeContext RuntimeTypeHandle
methodContext RuntimeTypeHandle
toType RuntimeTypeHandle
return bool
        internal extern bool SatisfiesConstraints(RuntimeTypeHandle[] typeContext, RuntimeTypeHandle[] methodContext, RuntimeTypeHandle toType);
        

Usage Example

        internal unsafe static bool SatisfiesConstraints(RuntimeType paramType, RuntimeType[] typeContext, RuntimeType[] methodContext, RuntimeType toType)
        {
            int typeContextLength;

            IntPtr[] array = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeContext, out typeContextLength);
            int      methodContextLength;

            IntPtr[] array2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodContext, out methodContextLength);
            fixed(IntPtr *ptr = array)
            {
                fixed(IntPtr *ptr2 = array2)
                {
                    bool result = RuntimeTypeHandle.SatisfiesConstraints(paramType, ptr, typeContextLength, ptr2, methodContextLength, toType);

                    GC.KeepAlive(typeContext);
                    GC.KeepAlive(methodContext);
                    return(result);
                }
            }
        }
All Usage Examples Of System.RuntimeTypeHandle::SatisfiesConstraints