Esempio n. 1
0
        public CorValue CreateValueForType(CorType type)
        {
            ICorDebugValue val   = null;
            ICorDebugEval2 eval2 = (ICorDebugEval2)m_eval;

            eval2.CreateValueForType(type.m_type, out val);
            return(val == null ? null : new CorValue(val));
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a value of the specified type with an initial value of 0 or null
        /// </summary>
        /// <param name="type">A class/value type, not an array or a string type</param>
        /// <returns></returns>
        public CorValue CreateValueForType(CorType type)
        {
            if (eval2 == null)
            {
                return(null);
            }
            ICorDebugValue value;
            int            hr = eval2.CreateValueForType(type.RawObject, out value);

            return(hr < 0 || value == null ? null : new CorValue(value));
        }