Beispiel #1
0
        // Implementation on IDebugValue
        public IDebugType RuntimeType()
        {
            IDebugType   pRetVal = null;
            IDebugBinder binder  = this.m_Context.Binder;

            if (null == this.m_RuntimeType)
            {
                binder.ResolveRuntimeType(this.m_Object, out this.m_RuntimeType);
            }
            if (null != this.m_RuntimeType)
            {
                pRetVal = SymbolHelper.DebugTypeFromField(this.m_RuntimeType, this.m_Context);
            }
            return(pRetVal);
        }
Beispiel #2
0
        public IDebugType GetType(string fullName)
        {
            IDebugField type = null;

            this.SymbolProvider.GetTypeByName(fullName, NAME_MATCH.nmCaseSensitive, out type);
            if (type != null)
            {
                return(SymbolHelper.DebugTypeFromField(type, this));
            }
            IEnumDebugFields namespaceList = null;

            this.SymbolProvider.GetNamespacesUsedAtAddress(this.Address, out namespaceList);
            if (namespaceList != null)
            {
                int        namespaceCount = 0;
                int        fetched        = 0;
                FIELD_INFO namespaceInfo  = new FIELD_INFO();
                namespaceList.GetCount(out namespaceCount);
                for (int i = 0; i < namespaceCount; i++)
                {
                    IDebugField[] namespc = new IDebugField[1];
                    namespaceList.Next(1, namespc, out fetched);
                    if (fetched > 0)
                    {
                        namespc[0].GetInfo(FIELD_INFO_FIELDS.FIF_FULLNAME, out namespaceInfo);
                        this.SymbolProvider.GetTypeByName(namespaceInfo.bstrFullName + "." + fullName, NAME_MATCH.nmCaseSensitive, out type);
                        if (type != null)
                        {
                            return(SymbolHelper.DebugTypeFromField(type, this));
                        }
                    }
                }
            }
            if (type == null)
            {
                this.SymbolProvider.GetTypeByName("StructuralTypes." + fullName, NAME_MATCH.nmCaseSensitive, out type);
            }
            if (type != null)
            {
                return(SymbolHelper.DebugTypeFromField(type, this));
            }
            return(null);
        }