public static CoverageMetric Value(ViewReportStyle vrs) { Type type = typeof(ViewReportStyle); string name = vrs.ToString(); return((from ca in type.GetField(name).GetCustomAttributes(typeof(CoverageTypeMappingAttribute), false).Cast <CoverageTypeMappingAttribute>() select ca.CoverageType).First <CoverageMetric>()); }
public ReportStyleMappingAttribute(ViewReportStyle vrs) { this.ReportStyle = vrs; }