Beispiel #1
0
 private RuntimeSyntheticConstructorInfo(SyntheticMethodId syntheticMethodId, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, InvokerOptions options, Func <Object, Object[], Object> invoker)
 {
     _syntheticMethodId     = syntheticMethodId;
     _declaringType         = declaringType;
     _options               = options;
     _invoker               = invoker;
     _runtimeParameterTypes = runtimeParameterTypes;
 }
Beispiel #2
0
 private RuntimeSyntheticConstructorInfo(SyntheticMethodId syntheticMethodId, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, InvokerOptions options, CustomMethodInvokerAction action)
 {
     _syntheticMethodId     = syntheticMethodId;
     _declaringType         = declaringType;
     _options               = options;
     _action                = action;
     _runtimeParameterTypes = runtimeParameterTypes;
 }
 private RuntimeSyntheticMethodInfo(SyntheticMethodId syntheticMethodId, String name, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] parameterTypes, RuntimeTypeInfo returnType, InvokerOptions options, CustomMethodInvokerAction action)
 {
     _syntheticMethodId = syntheticMethodId;
     _name                  = name;
     _declaringType         = declaringType;
     _options               = options;
     _action                = action;
     _runtimeParameterTypes = parameterTypes;
     _returnType            = returnType;
 }
 private RuntimeSyntheticMethodInfo(SyntheticMethodId syntheticMethodId, String name, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] parameterTypes, RuntimeTypeInfo returnType, InvokerOptions options, Func <Object, Object[], Object> invoker)
 {
     _syntheticMethodId = syntheticMethodId;
     _name                  = name;
     _declaringType         = declaringType;
     _options               = options;
     _invoker               = invoker;
     _runtimeParameterTypes = parameterTypes;
     _returnType            = returnType;
 }
Beispiel #5
0
        private static RuntimeArrayTypeInfo WithVerifiedTypeHandle(this RuntimeArrayTypeInfo arrayType, RuntimeTypeInfo elementType)
        {
            // We only permit creating parameterized types if the pay-for-play policy specifically allows them *or* if the result
            // type would be an open type.
            RuntimeTypeHandle typeHandle = arrayType.InternalTypeHandleIfAvailable;

            if (IsTypeConstructionEagerlyValidated &&
                typeHandle.IsNull() && !elementType.ContainsGenericParameters
#if FEATURE_COMINTEROP
                && !(elementType is RuntimeCLSIDTypeInfo)
#endif
                )
            {
                throw ReflectionCoreExecution.ExecutionDomain.CreateMissingArrayTypeException(elementType, isMultiDim: false, 1);
            }

            return(arrayType);
        }
Beispiel #6
0
 public static RuntimeTypeInfo GetMultiDimArrayTypeWithTypeHandle(this RuntimeTypeInfo elementType, int rank)
 {
     return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: true, rank: rank).WithVerifiedTypeHandle(elementType));
 }
Beispiel #7
0
 public static RuntimeTypeInfo GetMultiDimArrayType(this RuntimeTypeInfo elementType, int rank)
 {
     return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: true, rank: rank));
 }
Beispiel #8
0
 public static RuntimeTypeInfo GetArrayTypeWithTypeHandle(this RuntimeTypeInfo elementType)
 {
     return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: false, rank: 1).WithVerifiedTypeHandle(elementType));
 }
Beispiel #9
0
 public static RuntimeTypeInfo GetArrayType(this RuntimeTypeInfo elementType)
 {
     return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: false, rank: 1));
 }
Beispiel #10
0
 public static RuntimeTypeInfo GetMultiDimArrayType(this RuntimeTypeInfo elementType, int rank, RuntimeTypeHandle precomputedTypeHandle)
 {
     return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: true, rank: rank, precomputedTypeHandle: precomputedTypeHandle));
 }
Beispiel #11
0
        //======================================================================================================
        // This next group services the Type.GetTypeFromHandle() path. Since we already have a RuntimeTypeHandle
        // in that case, we pass it in as an extra argument as an optimization (otherwise, the unifier will
        // waste cycles looking up the handle again from the mapping tables.)
        //======================================================================================================

        public static RuntimeTypeInfo GetArrayType(this RuntimeTypeInfo elementType, RuntimeTypeHandle precomputedTypeHandle)
        {
            return(RuntimeArrayTypeInfo.GetArrayTypeInfo(elementType, multiDim: false, rank: 1, precomputedTypeHandle: precomputedTypeHandle));
        }
 internal static RuntimeMethodInfo GetRuntimeSyntheticMethodInfo(SyntheticMethodId syntheticMethodId, String name, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, RuntimeTypeInfo returnType, InvokerOptions options, CustomMethodInvokerAction action)
 {
     return(new RuntimeSyntheticMethodInfo(syntheticMethodId, name, declaringType, runtimeParameterTypes, returnType, options, action).WithDebugName());
 }
 internal static RuntimeSyntheticConstructorInfo GetRuntimeSyntheticConstructorInfo(SyntheticMethodId syntheticMethodId, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, InvokerOptions options, CustomMethodInvokerAction action)
 {
     return(new RuntimeSyntheticConstructorInfo(syntheticMethodId, declaringType, runtimeParameterTypes, options, action));
 }
Beispiel #14
0
 internal static RuntimeMethodInfo GetRuntimeSyntheticMethodInfo(SyntheticMethodId syntheticMethodId, String name, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, RuntimeTypeInfo returnType, InvokerOptions options, Func <Object, Object[], Object> invoker)
 {
     return(new RuntimeSyntheticMethodInfo(syntheticMethodId, name, declaringType, runtimeParameterTypes, returnType, options, invoker).WithDebugName());
 }
Beispiel #15
0
 internal static RuntimeSyntheticConstructorInfo GetRuntimeSyntheticConstructorInfo(SyntheticMethodId syntheticMethodId, RuntimeArrayTypeInfo declaringType, RuntimeTypeInfo[] runtimeParameterTypes, InvokerOptions options, Func <Object, Object[], Object> invoker)
 {
     return(new RuntimeSyntheticConstructorInfo(syntheticMethodId, declaringType, runtimeParameterTypes, options, invoker));
 }