public BindingSettings(BindingType type, int targetId, string targetPropertyName, NullCheckBehavior nullCheckBehavior, DataSource dataSource, TypeReference converter) { Type = type; TargetId = targetId; TargetPropertyName = targetPropertyName; NullCheckBehavior = nullCheckBehavior; DataSource = dataSource; Converter = converter; }
internal static bool ResolveNullCheckBehavior(NullCheckBehavior behavior, bool autoBehavior) { if (behavior == NullCheckBehavior.Auto) { return(autoBehavior); } else { return(NullCheckBehaviorToBool(behavior)); } }
internal static bool NullCheckBehaviorToBool(NullCheckBehavior behavior) { switch (behavior) { case NullCheckBehavior.EnableNullCheck: return(true); case NullCheckBehavior.DisableNullCheck: return(false); default: throw new ArgumentOutOfRangeException(nameof(behavior), behavior, null); } }
public BindingAttribute( BindingType bindingType = BindingType.OneWay, int targetId = 0, string targetPropertyName = null, NullCheckBehavior nullCheckBehavior = NullCheckBehavior.Auto, DataSource dataSource = DataSource.Value, Type converter = null) { BindingType = bindingType; TargetId = targetId; TargetPropertyName = targetPropertyName; NullCheckBehavior = nullCheckBehavior; Converter = converter; }