/// <summary>
 ///     Returns whether the given type is supported by the modifier
 /// </summary>
 /// <param name="type">The type to check for, must be either the same or be castable to the target type</param>
 /// <param name="part">Which part of the modifier to check, the value or the parameter</param>
 public bool SupportsType(Type type, ModifierTypePart part)
 {
     if (type == null)
     {
         return(true);
     }
     if (part == ModifierTypePart.Value)
     {
         return(ValueType.IsCastableFrom(type));
     }
     return(ParameterType != null && ParameterType.IsCastableFrom(type));
 }
Ejemplo n.º 2
0
 public List <BaseDataBindingModifierType> GetCompatibleModifierTypes(Type type, ModifierTypePart part)
 {
     return(DataBindingModifierTypeStore.GetForType(type, part).Select(r => r.DataBindingModifierType).ToList());
 }