public ConditionalAttribute(Type converterType, ConditionalBehaviors behaviors, ConditionOperator @operator, params string[] names)
 {
     this.ConverterType = converterType;
     this.Behaviors     = behaviors;
     this.Operator      = @operator;
     this.Names         = names;
 }
 public ConditionalAttribute(Type converterType, ConditionalBehaviors behaviors, ConditionOperator @operator, params string[] names)
 {
     this.ConverterType = converterType;
     _behaviors         = behaviors;
     _operator          = @operator;
     _names             = EnsureNames(names);
 }
Esempio n. 3
0
 public ConditionalConverterContext(IModel conditional, ConditionalBehaviors behaviors, string[] names, Type type, object value, ConditionOperator? @operator = null)
 {
     this.Conditional = conditional ?? throw new ArgumentNullException(nameof(conditional));
     this.Names       = names ?? throw new ArgumentNullException(nameof(names));
     this.Type        = type ?? throw new ArgumentNullException(nameof(type));
     this.Value       = value;
     this.Operator    = @operator;
     this.Behaviors   = behaviors;
 }
Esempio n. 4
0
        public ConditionalConverterContext(IModel conditional, ConditionalBehaviors behaviors, string[] names, Type type, object value, ConditionOperator? @operator = null)
        {
            if (conditional == null)
            {
                throw new ArgumentNullException("conditional");
            }

            if (names == null || names.Length < 1)
            {
                throw new ArgumentNullException("names");
            }

            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            _conditional = conditional;
            _behaviors   = behaviors;
            _names       = names;
            _type        = type;
            _value       = value;
            _operator    = @operator;
        }
Esempio n. 5
0
 protected Conditional(ConditionalBehaviors defaultBehaviors)
 {
     _defaultBehaviors     = defaultBehaviors;
     _conditionCombination = ConditionCombination.And;
 }
Esempio n. 6
0
 protected Conditional()
 {
     _defaultBehaviors     = ConditionalBehaviors.None;
     _conditionCombination = ConditionCombination.And;
 }
 public ConditionalAttribute(ConditionalBehaviors behaviors, ConditionOperator @operator, params string[] names)
 {
     this.Behaviors = behaviors;
     this.Operator  = @operator;
     this.Names     = names;
 }
 public ConditionalAttribute(ConditionalBehaviors behaviors, params string[] names)
 {
     this.Behaviors = behaviors;
     this.Names     = names;
 }
 public ConditionalAttribute(ConditionalBehaviors behaviors, ConditionOperator @operator, params string[] names)
 {
     _behaviors = behaviors;
     _operator  = @operator;
     _names     = EnsureNames(names);
 }
 public ConditionalAttribute(ConditionalBehaviors behaviors, params string[] names)
 {
     _behaviors = behaviors;
     _names     = EnsureNames(names);
 }
 public ConditionalAttribute(params string[] names)
 {
     _names     = EnsureNames(names);
     _behaviors = ConditionalBehaviors.IgnoreNullOrEmpty;
 }
 public ConditionalAttribute(bool ignored)
 {
     _ignored   = ignored;
     _behaviors = ConditionalBehaviors.IgnoreNullOrEmpty;
 }