/// <summary> /// Get value of particular feature /// </summary> /// <param name="featuresName">Feature name</param> /// <returns>Value of feature</returns> public static IEnumerable <(string, object)> GetFeatureInfo(ClassesCommandFeaturesName featuresName) { if (IsFeatureExist(featuresName)) { return(ClassCommandInfo.Where(tuple => tuple.Item1 == featuresName).Select(tuple => tuple.Item2)); } else { throw new Exception("No feature found with this feature name"); } }
/// <summary> /// Validation for feature name in class command info list /// </summary> /// <param name="featureName">Name of feature</param> public static bool IsFeatureExist(ClassesCommandFeaturesName featureName) { return(ClassCommandInfo.Any(item => item.Item1 == featureName)); }