コード例 #1
0
        public async System.Threading.Tasks.Task AnalyzeAndStoreAsync(List <Document> documents)
        {
            using (MiniProfiler.Current.Step(nameof(AnalyzeAndStoreAsync)))
            {
                var codeResults = await CodeFileAnalyzer.BuildIndexerAsync(documents);

                var generics = codeResults.SelectMany(e => e.Generics).Select(e => new KeyValuePair <MethodInfo, ExpressionResult>(e.NodeInformation.MethodInfo, e));
                await GenericMethods.AddMultipleAsync(generics.Where(e => e.Value.CanBeUsedAsQuery));

                CodeQueries.AddMultipleWithoutKey(codeResults.Select(e => e.Queries).ToList());
                OnStoreChangeHandler(ChangedFileTypeFlag.CSharp);
            }
        }