Ejemplo n.º 1
0
 private IEnumerable <ProjectPropertyName> GetProjectProperties()
 {
     return(Projects
            .SelectMany(prj => ProjectConfigurations.SelectMany(cfg => cfg.Properties.Values))
            .Distinct(new DelegateEqualityComparer <IProjectProperty>(p => p.Name))
            .Where(p => PropertyGroupName.IsNotProjectSpecific(p.Name))
            .Select(p => new ProjectPropertyName(p))
            .OrderBy(item => item.GroupName.Index));
 }
        private IEnumerable <ProjectPropertyName> GetProjectProperties()
        {
            Contract.Ensures(Contract.Result <IEnumerable <ProjectPropertyName> >() != null);

            return(_projects
                   .SelectMany(prj => ProjectConfigurations.SelectMany(cfg => cfg.Properties.Values))
                   .Select(prop => prop.Name)
                   .Distinct()
                   .Where(PropertyGrouping.IsNotProjectSpecific)
                   .Select(name => new ProjectPropertyName(name, PropertyGrouping.GetPropertyGroupName(name))));
        }