public ISymbolInfo this[string symbolName] { get { if (_symbolInfo == null) { _symbolInfo = NMSymbolResolver.LoadSymbolInfo(_bin); } if (_symbolInfo[symbolName].Count > 1) { throw new NotSupportedException("More than a single function with this name"); } return(_symbolInfo[symbolName].First()); } }
public ISymbolInfo this[string symbolName] { get { lock (this) { if (_symbolInfo == null) { _symbolInfo = NMSymbolResolver.LoadSymbolInfo(_bin, _toolchainPath, _toolchainPrefix); } } if (!_symbolInfo.ContainsKey(symbolName)) { throw new KeyNotFoundException("No symbol with name " + symbolName); } if (_symbolInfo[symbolName].Count > 1) { throw new NotSupportedException("More than a single function with this name"); } return(_symbolInfo[symbolName].First()); } }