예제 #1
0
        private async Task AnalyzeOnDemandAsync()
        {
            if (this.source != null)
            {
                this.SolutionManager = await AsyncSolutionManager.CreateFromSourceAsync(this.source);
            }
            else if (this.testName != null)
            {
                this.SolutionManager = await AsyncSolutionManager.CreateFromTestAsync(this.testName);
            }
            else if (this.solutionPath != null)
            {
                this.SolutionManager = await AsyncSolutionManager.CreateFromSolutionAsync(this.solutionPath);
            }
            else
            {
                throw new Exception("We need a solutionPath, source code or testName to analyze");
            }

            var roots = await this.SolutionManager.GetRootsAsync(this.RootKind);

            var orchestator = new AnalysisOrchestrator(this.SolutionManager);
            await orchestator.AnalyzeAsync(roots);
        }
예제 #2
0
        internal Task UpdateMethodAsync(MethodDescriptor methodDescriptor, string newSource)
        {
            var orchestator = new AnalysisOrchestrator(this.SolutionManager);

            return(orchestator.UpdateMethodAsync(methodDescriptor, newSource));
        }
예제 #3
0
        public Task ApplyModificationsAsync(IEnumerable <string> modifiedDocuments)
        {
            var orchestator = new AnalysisOrchestrator(this.SolutionManager);

            return(orchestator.ApplyModificationsAsync(modifiedDocuments));
        }