示例#1
0
 protected override MethodMetricsReport AnalyzeMethod(IMethodDefinition method, PdbReader pdb, IMetadataHost host)
 {
     return(new MethodMetricsReport
     {
         Name = method.Name(),
         Signature = method.Signature(),
         CompilerGenerated = method.IsGeneratedCode(),
         OnlyDeclaration = method.IsOnlyDeclaration(),
         DefaultConstructor = method.IsDefaultCtor(),
         SourceLocation = SourceCodeLocating.OfMethod(method, pdb),
         CyclomaticComplexity = CyclomaticComplexityOfAst.Of(method, pdb, host),
         NumberOfStatements = NumberOfStatements.Of(method, pdb, host),
         NumberOfRealLines = NumberOfRealLines.Of(method, pdb),
         NumberOfLogicalLines = NumberOfLogicalLines.Of(method, pdb),
         TypeDependencies = TypeDependencies.Of(method)
     });
 }
示例#2
0
 protected override MethodMetricsReport AnalyzeMethod(IMethodDefinition method, PdbReader pdb, IMetadataHost host)
 {
     return new MethodMetricsReport
     {
         Name = method.Name(),
         Signature = method.Signature(),
         CompilerGenerated = method.IsGeneratedCode(),
         OnlyDeclaration = method.IsOnlyDeclaration(),
         DefaultConstructor = method.IsDefaultCtor(),
         SourceLocation = SourceCodeLocating.Of(method, pdb),
         CyclomaticComplexity = CyclomaticComplexityOfAst.Of(method, pdb, host),
         NumberOfStatements = NumberOfStatements.Of(method, pdb, host),
         NumberOfRealLines = NumberOfRealLines.Of(method, pdb),
         NumberOfLogicalLines = NumberOfLogicalLines.Of(method, pdb),
         TypeDependencies = TypeDependencies.Of(method)
     };
 }