Exemplo n.º 1
0
        public ToolTipInfo ObtainToolTip(string filepath, int line, int character)
        {
            var compilation = _diagnosticBroker.LastAnalysedCompilation;

            // We have to work with already fully analyzed and bound compilation that is up-to-date with the client's code
            if (compilation == null)
            {
                return(null);
            }

            // Find the symbols gathered from the given source code
            return(ToolTipUtils.ObtainToolTip(compilation, filepath, line, character));
        }
Exemplo n.º 2
0
        internal IEnumerable <Protocol.Location> ObtainDefinition(string filepath, int line, int character)
        {
            var compilation = _diagnosticBroker.LastAnalysedCompilation;

            // We have to work with already fully analyzed and bound compilation that is up-to-date with the client's code
            if (compilation == null)
            {
                return(Array.Empty <Protocol.Location>());
            }

            // Find the symbols gathered from the given source code
            return(ToolTipUtils.ObtainDefinition(compilation, filepath, line, character));
        }