Changeset 4153
- Timestamp:
- 08/04/10 17:11:42 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3/Constraints
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Constraints/ComparisonConstraint.cs
r4068 r4153 28 28 [Item("ComparisonConstraint", "A constraint which checks for specified compare operation.")] 29 29 public class ComparisonConstraint : Constraint { 30 public ComparisonConstraint()31 : base() {32 }33 30 [StorableConstructor] 34 protected ComparisonConstraint(bool deserializing) { 35 } 31 protected ComparisonConstraint(bool deserializing) : base(deserializing) { } 32 33 public ComparisonConstraint() : base() { } 36 34 public ComparisonConstraint(IItem constrainedValue, ConstraintOperation comparisonOperation, object comparisonValue) 37 35 : base(constrainedValue, comparisonOperation, comparisonValue) { -
trunk/sources/HeuristicLab.Core/3.3/Constraints/Constraint.cs
r4068 r4153 29 29 [StorableClass] 30 30 public abstract class Constraint : Item, IConstraint { 31 [StorableConstructor] 32 protected Constraint(bool deserializing) : base(deserializing) { } 33 31 34 protected Constraint() { 32 35 this.Active = false; 33 36 if (AllowedConstraintOperations != null && AllowedConstraintOperations.Count() != 0) 34 37 this.ConstraintOperation = AllowedConstraintOperations.ElementAt(0); 35 }36 [StorableConstructor]37 protected Constraint(bool deserializing) {38 38 } 39 39 protected Constraint(IItem constrainedValue, ConstraintOperation constraintOperation, object constraintData) … … 115 115 return this.constrainedValue; 116 116 } 117 protected abstract bool Check(object constrainedMember); 118 protected abstract bool Check(object constrainedMember, out string errorMessage); 119 117 120 public bool Check() { 118 121 if (!Active) … … 122 125 return this.Check(constrainedMember); 123 126 } 124 protected abstract bool Check(object constrainedMember);125 126 127 public bool Check(out string errorMessage) { 127 128 errorMessage = string.Empty; … … 132 133 return this.Check(constrainedMember, out errorMessage); 133 134 } 134 135 protected abstract bool Check(object constrainedMember, out string errorMessage);136 135 137 136 #region events -
trunk/sources/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs
r4068 r4153 39 39 40 40 [StorableConstructor] 41 protected ConstraintOperation(bool deserializing) { 42 } 41 protected ConstraintOperation(bool deserializing) { } 43 42 protected ConstraintOperation(int value, string name) { 44 43 this.value = value; -
trunk/sources/HeuristicLab.Core/3.3/Constraints/EqualityConstraint.cs
r4068 r4153 28 28 [Item("EqualityConstraint", "A constraint which checks for equality.")] 29 29 public class EqualityConstraint : Constraint { 30 public EqualityConstraint()31 : base() {32 }33 30 [StorableConstructor] 34 protected EqualityConstraint(bool deserializing) { 35 } 31 protected EqualityConstraint(bool deserializing) : base(deserializing) { } 32 33 public EqualityConstraint() : base() { } 36 34 public EqualityConstraint(IItem constrainedValue, ConstraintOperation constraintOperation, object constraintData) 37 35 : base(constrainedValue, constraintOperation, constraintData) { -
trunk/sources/HeuristicLab.Core/3.3/Constraints/TypeCompatibilityConstraint.cs
r4068 r4153 31 31 } 32 32 [StorableConstructor] 33 protected TypeCompatibilityConstraint(bool deserializing) 34 : base() { 35 } 33 protected TypeCompatibilityConstraint(bool deserializing) : base(deserializing) { } 36 34 public TypeCompatibilityConstraint(IItem constrainedValue, ConstraintOperation constraintOperation, Type constraintData) 37 35 : base(constrainedValue, constraintOperation, constraintData) {
Note: See TracChangeset
for help on using the changeset viewer.