internal ProjectPropertyName([NotNull] string name, [NotNull] PropertyGroupName groupName) { Contract.Requires(name != null); Contract.Requires(groupName != null); _name = name; _groupName = groupName; _displayName = HasGroupNamePrefix(name, groupName.Name) ? name.Substring(groupName.Name.Length) : name; }
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(PropertyGroupName.IsNotProjectSpecific) .Select(name => new ProjectPropertyName(name, PropertyGroupName.GetGroupForProperty(name))) .OrderBy(item => item.GroupName.Index)); }
internal ProjectPropertyName([NotNull] IProjectProperty property) { Name = property.Name; var label = property.Group.Label; GroupName = !string.IsNullOrEmpty(label) ? new PropertyGroupName(label) : PropertyGroupName.GetGroupForProperty(Name); DisplayName = GetDisplayName(Name, GroupName.Name); }