private static Dictionary<string, object> RemoveUnknownFields(Dictionary<string, object> values, AttributeSet attributeSet)
 {
     var listAllowed = attributeSet.GetAttributes();
     values =
         values.Where(x => listAllowed.Any(y => y.StaticName == x.Key))
             .ToDictionary(x => x.Key, y => y.Value);
     return values;
 }
Exemple #2
0
 public static Eav.Attribute GetAttribute(this AttributeSet attributeSet, string attributeName)
 {
     return(attributeSet.GetAttributes().FirstOrDefault(attr => attr.StaticName == attributeName));
 }