public UninstantiatedModuleInfo GetUninstantiatedModuleInfoByPath(AbsolutePath path) { Contract.Requires(path.IsValid, "path.IsValid"); if (!m_uninstantiatedModuleDictionary.TryGetValue(ModuleLiteralId.Create(path), out UninstantiatedModuleInfo result)) { string message = I($"Can't find uninstantiated module by path '{path.ToDebuggerDisplay()}'"); Contract.Assume(false, message); // Throwing an exception to prevent potential NRE if contracts are disabled. throw new InvalidOperationException(message); } return(result); }
public TypeOrNamespaceModuleLiteral GetTypeOrNamespaceModuleLiteral() { return(new TypeOrNamespaceModuleLiteral(ModuleLiteralId.Create(GetFullSymbol()), GetFileModuleLiteral().Qualifier, GetFileModuleLiteral(), DefaultLineInfo)); }
/// <nodoc/> public bool TryGetUninstantiatedModuleInfoByPath(AbsolutePath path, out UninstantiatedModuleInfo result) { return(m_uninstantiatedModuleDictionary.TryGetValue(ModuleLiteralId.Create(path), out result)); }