public static bool IsIncluded(this ProductPropertyDefinitionGroup propertyGroup) { if (propertyGroup == null) { throw new ArgumentNullException(nameof(propertyGroup)); } return(!SpecificationConfiguration.ExcludedSpecificationPropertyGroups.Contains(propertyGroup.Name)); }
protected virtual List <SpecificationsAttributeViewModel> GetSpecificationsAttributes(ProductPropertyDefinitionGroup group, GetProductSpecificationsParam param) { var specificationAttributes = group.Properties .Where(property => property.IsIncluded()) .OrderBy(property => property.DisplayOrder) .Select(property => new SpecificationsAttributeViewModel { PropertyName = property.PropertyName, Title = GetLocalizedTitle(property.DisplayName), Value = GetSpecificationsAttributeValue(property, param) }) .Where(attribute => !string.IsNullOrWhiteSpace(attribute.Value)) .ToList(); return(specificationAttributes); }