عنوان:

‫محاسبه‌ی میزان پیچیدگی کدهای قسمت‌های مختلف برنامه


نویسنده: وحید نصیری
تاریخ: ۱۳۹۷/۰۵/۳۰ ۱۵:۳۸
آدرس: www.dntips.ir
// <Name>Aggregate Type Complexity</Name>
from t in Application.Types
 
let aggregateTypeCC = t.MethodsAndContructors.Sum(m => m.CyclomaticComplexity / 10)
let rawCC = t.MethodsAndContructors.Sum(m => m.CyclomaticComplexity)
 
// optional optimization if not comparing rawCC
// where aggregateCC >= 10
 
orderby aggregateTypeCC descending 
select new { t, aggregateTypeCC, rawCC }


مشاهده مطلب اصلی