예제 #1
0
        /// <summary>
        /// Returns an array with completion suggestions for the given file and position.
        /// Returns null if the given uri is null or if the specified file is not listed as source file.
        /// </summary>
        public static SymbolInformation[] DocumentSymbols(this FileContentManager file)
        {
            if (file == null)
            {
                return(null);
            }
            var namespaceDeclarations = file.NamespaceDeclarationsSymbolInfo();
            var typeDeclarations      = file.TypeDeclarationsSymbolInfo();
            var callableDeclarations  = file.CallableDeclarationsSymbolInfo();

            return(namespaceDeclarations.Concat(typeDeclarations).Concat(callableDeclarations).ToArray());
        }