| 831 | } |
| 832 | |
| 833 | void DbgExprEvaluator::GetNamespaceSearch() |
| 834 | { |
| 835 | if (!mNamespaceSearch.empty()) |
| 836 | return; |
| 837 | |
| 838 | auto currentMethod = GetCurrentMethod(); |
| 839 | if (currentMethod != NULL) |
| 840 | { |
| 841 | auto parent = currentMethod->GetParent(); |
| 842 | while (parent != NULL) |
| 843 | { |
| 844 | parent = parent->GetPrimaryType(); |
| 845 | mNamespaceSearch.push_back(parent); |
| 846 | parent = parent->mParent; |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | if (!mNamespaceSearchStr.empty()) |
| 851 | { |
| 852 | auto language = GetLanguage(); |
| 853 | int lastComma = -1; |
| 854 | for (int i = 0; i < (int)mNamespaceSearchStr.length(); i++) |
| 855 | { |
| 856 | if (mNamespaceSearchStr[i] == ',') |
| 857 | { |
| 858 | String namespaceEntry = mNamespaceSearchStr.Substring(lastComma + 1, i - lastComma - 1); |
| 859 | auto dbgTypeEntry = mDbgModule->mTypeMap.Find(namespaceEntry.c_str(), language); |
| 860 | if (dbgTypeEntry != NULL) |
| 861 | mNamespaceSearch.push_back(dbgTypeEntry->mValue); |
| 862 | lastComma = i; |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | String namespaceEntry = mNamespaceSearchStr.Substring(lastComma + 1); |
| 867 | auto dbgTypeEntry = mDbgModule->mTypeMap.Find(namespaceEntry.c_str(), language); |
| 868 | if (dbgTypeEntry != NULL) |
| 869 | mNamespaceSearch.push_back(dbgTypeEntry->mValue); |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | DbgType* DbgExprEvaluator::ResolveSubTypeRef(DbgType* checkType, const StringImpl& name) |
| 874 | { |