Esempio n. 1
0
 /// <summary>
 /// Instantiates a new parameterized type object of the specified class without attempting to call a constructor method
 /// </summary>
 /// <param name="cls">Class</param>
 /// <param name="typeArgs">Type args or null if none required</param>
 /// <returns></returns>
 public int NewParameterizedObjectNoConstructor(CorClass cls, CorType[] typeArgs)
 {
     if (eval2 == null)
     {
         if (typeArgs == null || typeArgs.Length == 0)
         {
             return(NewObjectNoConstructor(cls));
         }
         return(-1);
     }
     return(eval2.NewParameterizedObjectNoConstructor(cls.RawObject, typeArgs == null ? 0 : typeArgs.Length, typeArgs.ToCorDebugArray()));
 }
Esempio n. 2
0
        public void NewParameterizedObjectNoConstructor(CorClass managedClass, CorType[] argumentTypes)
        {
            ICorDebugType[] types       = null;
            int             typesLength = 0;
            ICorDebugEval2  eval2       = (ICorDebugEval2)m_eval;

            if (argumentTypes != null)
            {
                types = new ICorDebugType[argumentTypes.Length];
                for (int i = 0; i < argumentTypes.Length; i++)
                {
                    types[i] = argumentTypes[i].m_type;
                }
                typesLength = types.Length;
            }
            eval2.NewParameterizedObjectNoConstructor(managedClass.m_class, (uint)typesLength, types);
        }