public ProductAttributeDescription(string name, string partName, ProductAttributeField field, ProductAttributeFieldSettings settings)
 {
     Name     = name;
     PartName = partName;
     Field    = field;
     Settings = settings;
 }
示例#2
0
 private ProductAttributeFieldSettings GetFieldSettings(ContentPartFieldDefinition partFieldDefinition, ProductAttributeField field)
 {
     return(field
            ?.GetType()
            ?.GetMethod(
                // Using that type parameter arbitrarily, any one of the concrete attribute settings types would have done.
                nameof(ProductAttributeField <TextProductAttributeFieldSettings> .GetSettings),
                BindingFlags.Instance | BindingFlags.Public)
            ?.Invoke(field, new[] { partFieldDefinition }) as ProductAttributeFieldSettings);
 }