Beispiel #1
0
        internal static bool DiffSigs(Signature sig1, RuntimeTypeHandle typeHandle1, Signature sig2, RuntimeTypeHandle typeHandle2)
        {
            SignatureStruct left  = (SignatureStruct)sig1;
            SignatureStruct right = (SignatureStruct)sig2;

            return(CompareSig(ref left, typeHandle1, ref right, typeHandle2));
        }
Beispiel #2
0
        public unsafe Signature(void *pCorSig, int cCorSig, RuntimeTypeHandle declaringTypeHandle)
        {
            SignatureStruct signature = new SignatureStruct();

            GetSignature(ref signature, pCorSig, cCorSig, new RuntimeFieldHandle(null), new RuntimeMethodHandle(null), declaringTypeHandle);
            this.m_signature = signature;
        }
        public unsafe Signature(void *pCorSig, int cCorSig, RuntimeType declaringType)
        {
            SignatureStruct signature = new SignatureStruct();

            GetSignature(ref signature, pCorSig, cCorSig, new RuntimeFieldHandleInternal(), null, declaringType);
            this.m_signature = signature;
        }
        public Signature(IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
        {
            SignatureStruct signature = new SignatureStruct();

            GetSignature(ref signature, null, 0, new RuntimeFieldHandleInternal(), methodHandle, declaringType);
            this.m_signature = signature;
        }
        public Signature(IRuntimeMethodInfo method, RuntimeType[] arguments, RuntimeType returnType, CallingConventions callingConvention)
        {
            SignatureStruct signature = new SignatureStruct(method.Value, arguments, returnType, callingConvention);

            GetSignatureForDynamicMethod(ref signature, method);
            this.m_signature = signature;
        }
 public Signature(IRuntimeFieldInfo fieldHandle, RuntimeType declaringType)
 {
     SignatureStruct signature = new SignatureStruct();
     GetSignature(ref signature, null, 0, fieldHandle.Value, null, declaringType);
     GC.KeepAlive(fieldHandle);
     this.m_signature = signature;
 }
Beispiel #7
0
        public Signature(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
        {
            SignatureStruct signature = new SignatureStruct();

            GetSignature(ref signature, null, 0, new RuntimeFieldHandle(null), methodHandle, declaringTypeHandle);
            this.m_signature = signature;
        }
        internal static bool DiffSigs(Signature sig1, Signature sig2)
        {
            SignatureStruct left  = (SignatureStruct)sig1;
            SignatureStruct right = (SignatureStruct)sig2;

            return(CompareSig(ref left, ref right));
        }
        public Signature(IRuntimeFieldInfo fieldHandle, RuntimeType declaringType)
        {
            SignatureStruct signature = new SignatureStruct();

            GetSignature(ref signature, null, 0, fieldHandle.Value, null, declaringType);
            GC.KeepAlive(fieldHandle);
            this.m_signature = signature;
        }
Beispiel #10
0
        internal static object InvokeMethodFast(IRuntimeMethodInfo method, object target, object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
        {
            SignatureStruct signature = sig.m_signature;
            object          obj2      = _InvokeMethodFast(method, target, arguments, ref signature, methodAttributes, typeOwner);

            sig.m_signature = signature;
            return(obj2);
        }
        internal object InvokeMethodFast(object target, object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
        {
            SignatureStruct signature = sig.m_signature;
            object          obj2      = this._InvokeMethodFast(target, arguments, ref signature, methodAttributes, typeOwner);

            sig.m_signature = signature;
            return(obj2);
        }
        public Type[] GetCustomModifiers(int position, bool required)
        {
            Type[]          typeArray = null;
            Type[]          optional  = null;
            SignatureStruct signature = (SignatureStruct)this;

            GetCustomModifiers(ref signature, position, out typeArray, out optional);
            if (!required)
            {
                return(optional);
            }
            return(typeArray);
        }
Beispiel #13
0
        public Type[] GetCustomModifiers(int position, bool required)
        {
            RuntimeTypeHandle[] handleArray = null;
            RuntimeTypeHandle[] optional    = null;
            SignatureStruct     signature   = (SignatureStruct)this;

            GetCustomModifiers(ref signature, position, out handleArray, out optional);
            Type[] typeArray = new Type[required ? handleArray.Length : optional.Length];
            if (required)
            {
                for (int j = 0; j < typeArray.Length; j++)
                {
                    typeArray[j] = handleArray[j].GetRuntimeType();
                }
                return(typeArray);
            }
            for (int i = 0; i < typeArray.Length; i++)
            {
                typeArray[i] = optional[i].GetRuntimeType();
            }
            return(typeArray);
        }
 private extern object _InvokeMethodFast(
     object target, object[] arguments, ref SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner);
 public Signature(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
 {
     SignatureStruct pinnedSignature = new SignatureStruct();
     GetSignature(ref pinnedSignature, null, 0, fieldHandle, new RuntimeMethodHandle(null), declaringTypeHandle);
     m_signature = pinnedSignature;
 }
 internal static void GetSignatureForDynamicMethod(
     ref SignatureStruct signature, // This parameter must be passed as a pointer to the stack to prevent GC holes
     RuntimeMethodHandle methodHandle)
 {
     _GetSignature(ref signature, null, 0, (IntPtr)0, methodHandle.Value, (IntPtr)0);
 }
 private static extern void _GetSignature(
     ref SignatureStruct signature, // This parameter must be passed as a pointer to the stack to prevent GC holes
     void* pCorSig, int cCorSig,
     IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle);
 private static extern unsafe void GetSignature(ref SignatureStruct signature, void* pCorSig, int cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType);
 public Signature(IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
 {
     SignatureStruct signature = new SignatureStruct();
     GetSignature(ref signature, null, 0, new RuntimeFieldHandleInternal(), methodHandle, declaringType);
     this.m_signature = signature;
 }
Beispiel #20
0
 public unsafe Signature(void* pCorSig, int cCorSig, RuntimeTypeHandle declaringTypeHandle)
 {
     SignatureStruct signature = new SignatureStruct();
     GetSignature(ref signature, pCorSig, cCorSig, new RuntimeFieldHandle(null), new RuntimeMethodHandle(null), declaringTypeHandle);
     this.m_signature = signature;
 }
Beispiel #21
0
 private static extern object _InvokeConstructor(IRuntimeMethodInfo method, object[] args, ref SignatureStruct signature, RuntimeType declaringType);
Beispiel #22
0
 internal static void GetSignatureForDynamicMethod(ref SignatureStruct signature, RuntimeMethodHandle methodHandle)
 {
     _GetSignature(ref signature, null, 0, IntPtr.Zero, methodHandle.Value, IntPtr.Zero);
 }
Beispiel #23
0
 private static unsafe void GetSignature(ref SignatureStruct signature, void *pCorSig, int cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
 {
     _GetSignature(ref signature, pCorSig, cCorSig, fieldHandle.Value, methodHandle.Value, declaringTypeHandle.Value);
 }
Beispiel #24
0
 internal static object InvokeConstructor(IRuntimeMethodInfo method, object[] args, SignatureStruct signature, RuntimeType declaringType)
 {
     return(_InvokeConstructor(method, args, ref signature, declaringType));
 }
Beispiel #25
0
 private static extern bool CompareSig(ref SignatureStruct left, RuntimeTypeHandle typeLeft, ref SignatureStruct right, RuntimeTypeHandle typeRight);
Beispiel #26
0
 private static extern unsafe void _GetSignature(ref SignatureStruct signature, void *pCorSig, int cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle);
 internal object InvokeConstructor (object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
 {
     return _InvokeConstructor(args, ref signature, declaringType.Value);
 }
Beispiel #28
0
 private static extern object _InvokeMethodFast(IRuntimeMethodInfo method, object target, object[] arguments, ref SignatureStruct sig, MethodAttributes methodAttributes, RuntimeType typeOwner);
 internal void SerializationInvoke(
     Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
 {
     _SerializationInvoke(target, ref declaringTypeSig, info, context);
 }
 internal void SerializationInvoke(object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
 {
     this._SerializationInvoke(target, ref declaringTypeSig, info, context);
 }
Beispiel #31
0
 private static extern void _SerializationInvoke(IRuntimeMethodInfo method, object target, ref SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context);
 private extern void _SerializationInvoke(object target, ref SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context);
 public unsafe Signature(void* pCorSig, int cCorSig, RuntimeType declaringType)
 {
     SignatureStruct signature = new SignatureStruct();
     GetSignature(ref signature, pCorSig, cCorSig, new RuntimeFieldHandleInternal(), null, declaringType);
     this.m_signature = signature;
 }
 private static extern bool CompareSig(ref SignatureStruct left, ref SignatureStruct right);
 internal static void GetSignatureForDynamicMethod(ref SignatureStruct signature, IRuntimeMethodInfo methodHandle)
 {
     GetSignature(ref signature, null, 0, new RuntimeFieldHandleInternal(), methodHandle, null);
 }
Beispiel #36
0
 private static extern unsafe void _GetSignature(ref SignatureStruct signature, void* pCorSig, int cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle);
 private static void GetSignature(
     ref SignatureStruct signature, // This parameter must be passed as a pointer to the stack to prevent GC holes
     void* pCorSig, int cCorSig,
     RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
 {
     _GetSignature(ref signature, pCorSig, cCorSig, fieldHandle.Value, methodHandle.Value, declaringTypeHandle.Value);
 }
Beispiel #38
0
 private static extern void GetCustomModifiers(ref SignatureStruct signature, int parameter, out RuntimeTypeHandle[] required, out RuntimeTypeHandle[] optional);
 private static extern bool CompareSig(ref SignatureStruct left, ref SignatureStruct right); 
Beispiel #40
0
 internal static void GetSignatureForDynamicMethod(ref SignatureStruct signature, RuntimeMethodHandle methodHandle)
 {
     _GetSignature(ref signature, null, 0, IntPtr.Zero, methodHandle.Value, IntPtr.Zero);
 }
 public Signature(void* pCorSig, int cCorSig, RuntimeTypeHandle declaringTypeHandle)
 {
     SignatureStruct pinnedSignature = new SignatureStruct();
     GetSignature(ref pinnedSignature, pCorSig, cCorSig, new RuntimeFieldHandle(null), new RuntimeMethodHandle(null), declaringTypeHandle);
     m_signature = pinnedSignature;
 }
		private static extern object _InvokeConstructor(IRuntimeMethodInfo method, object[] args, ref SignatureStruct signature, RuntimeType declaringType);
 private extern object _InvokeConstructor(object[] args, ref SignatureStruct signature, IntPtr declaringType);
		private static extern void _SerializationInvoke(IRuntimeMethodInfo method, object target, ref SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context);
 private extern void _SerializationInvoke(
     Object target, ref SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context);
 internal object InvokeConstructor(object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
 {
     return(this._InvokeConstructor(args, ref signature, declaringType.Value));
 }
Beispiel #47
0
 public Signature(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
 {
     SignatureStruct signature = new SignatureStruct();
     GetSignature(ref signature, null, 0, new RuntimeFieldHandle(null), methodHandle, declaringTypeHandle);
     this.m_signature = signature;
 }
 private extern object _InvokeConstructor(object[] args, ref SignatureStruct signature, IntPtr declaringType);
Beispiel #49
0
 public Signature(RuntimeMethodHandle method, RuntimeTypeHandle[] arguments, RuntimeTypeHandle returnType, CallingConventions callingConvention)
 {
     SignatureStruct signature = new SignatureStruct(method, arguments, returnType, callingConvention);
     GetSignatureForDynamicMethod(ref signature, method);
     this.m_signature = signature;
 }
Beispiel #50
0
 internal static void SerializationInvoke(IRuntimeMethodInfo method, object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
 {
     _SerializationInvoke(method, target, ref declaringTypeSig, info, context);
 }
Beispiel #51
0
 private static extern bool CompareSig(ref SignatureStruct left, RuntimeTypeHandle typeLeft, ref SignatureStruct right, RuntimeTypeHandle typeRight);
 private static extern void GetCustomModifiers(ref SignatureStruct signature, int parameter, out Type[] required, out Type[] optional);
Beispiel #53
0
 private static unsafe void GetSignature(ref SignatureStruct signature, void* pCorSig, int cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
 {
     _GetSignature(ref signature, pCorSig, cCorSig, fieldHandle.Value, methodHandle.Value, declaringTypeHandle.Value);
 }
 private static extern unsafe void GetSignature(ref SignatureStruct signature, void *pCorSig, int cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType);
		private static extern object _InvokeMethodFast(IRuntimeMethodInfo method, object target, object[] arguments, ref SignatureStruct sig, MethodAttributes methodAttributes, RuntimeType typeOwner);
 internal static void GetSignatureForDynamicMethod(ref SignatureStruct signature, IRuntimeMethodInfo methodHandle)
 {
     GetSignature(ref signature, null, 0, new RuntimeFieldHandleInternal(), methodHandle, null);
 }
		internal static object InvokeConstructor(IRuntimeMethodInfo method, object[] args, SignatureStruct signature, RuntimeType declaringType)
		{
			return RuntimeMethodHandle._InvokeConstructor(method, args, ref signature, declaringType);
		}
		public unsafe Signature(void* pCorSig, int cCorSig, RuntimeType declaringType)
		{
			SignatureStruct signature = default(SignatureStruct);
			Signature.GetSignature(ref signature, pCorSig, cCorSig, default(RuntimeFieldHandleInternal), null, declaringType);
			this.m_signature = signature;
		}
		internal static void SerializationInvoke(IRuntimeMethodInfo method, object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
		{
			RuntimeMethodHandle._SerializationInvoke(method, target, ref declaringTypeSig, info, context);
		}
 private extern object _InvokeMethodFast(object target, object[] arguments, ref SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner);