示例#1
0
        /// <summary>
        /// Gets all features for the given category
        /// </summary>
        public static IEnumerable <Feature> ByCategory(FeatureCategory category)
        {
            var result = new List <Feature>();

            Configure.Instance.ForAllTypes <Feature>(t =>
            {
                var feature = (Feature)Activator.CreateInstance(t);

                if (feature.Category == category)
                {
                    result.Add(feature);
                }
            });

            return(result);
        }
示例#2
0
 protected bool Equals(FeatureCategory other)
 {
     return(string.Equals(name, other.name));
 }