public static bool IsMultiValue(this MemberProperty property, MultiValueType specificType) { ExceptionUtilities.CheckArgumentNotNull(property, "property"); var propertyBagType = property.PropertyType as CollectionDataType; if (propertyBagType != null && specificType == MultiValueType.Primitive && propertyBagType.ElementDataType is PrimitiveDataType) { return(true); } else if (propertyBagType != null && specificType == MultiValueType.Complex && propertyBagType.ElementDataType is ComplexDataType) { return(true); } return(false); }
public static IEnumerable<MemberProperty> MultiValue(this IEnumerable<MemberProperty> properties, MultiValueType specificType) { ExceptionUtilities.CheckArgumentNotNull(properties, "properties"); return properties.Where(property => property.IsMultiValue(specificType)); }
public static bool IsMultiValue(this MemberProperty property, MultiValueType specificType) { ExceptionUtilities.CheckArgumentNotNull(property, "property"); var propertyBagType = property.PropertyType as CollectionDataType; if (propertyBagType != null && specificType == MultiValueType.Primitive && propertyBagType.ElementDataType is PrimitiveDataType) { return true; } else if (propertyBagType != null && specificType == MultiValueType.Complex && propertyBagType.ElementDataType is ComplexDataType) { return true; } return false; }
public static IEnumerable <MemberProperty> MultiValue(this IEnumerable <MemberProperty> properties, MultiValueType specificType) { ExceptionUtilities.CheckArgumentNotNull(properties, "properties"); return(properties.Where(property => property.IsMultiValue(specificType))); }