ArchiMetrics.CodeReview.Rules.Tests.Rules.NodeReviewerTests.PerformInspection C# (CSharp) Метод

PerformInspection() публичный статический Метод

public static PerformInspection ( string code, Type evaluatorType ) : Task>
code string
evaluatorType System.Type
Результат Task>
        public static async Task<IEnumerable<EvaluationResult>> PerformInspection(string code, Type evaluatorType)
        {
            var inspector = new NodeReviewer(new[] { (ICodeEvaluation)Activator.CreateInstance(evaluatorType) }, Enumerable.Empty<ISymbolEvaluation>());
            var tree = CSharpSyntaxTree.ParseText("namespace TestSpace { public class ParseClass { " + code + " } }", CSharpParseOptions.Default, string.Empty, Encoding.Unicode, CancellationToken.None);

            return await inspector.Inspect(string.Empty, string.Empty, tree.GetRoot(), null, null);
        }