Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public static Eav.Attribute GetAttribute(this AttributeSet attributeSet, string attributeName)
 {
     return(attributeSet.GetAttributes().FirstOrDefault(attr => attr.StaticName == attributeName));
 }