using System.Collections.Generic;
using System.Linq;
namespace CTA.FeatureDetection.Common.Models
{
///
/// Contains resulting information from an attempt to detect features
///
public class FeatureDetectionResult
{
///
/// Path of project that was searched for features
///
public string ProjectPath { get; set; }
///
/// Collection of features and whether or not they were found in a project
///
public Dictionary FeatureStatus { get; }
///
/// All features that were searched for in the detection attempt
///
public IEnumerable FeatureCohort => FeatureStatus.Keys;
///
/// Collection of features that were present in the project
///
public IEnumerable PresentFeatures =>
FeatureCohort.Where(f => FeatureStatus[f]);
///
/// Collection of features that were not present in the project
///
public IEnumerable AbsentFeatures =>
FeatureCohort.Where(f => !FeatureStatus[f]);
public FeatureDetectionResult()
{
FeatureStatus = new Dictionary();
}
}
}