private void CheckElement(ConstraintContext ctx, IModelElement mel, ISchemaElement schema) { List <AbstractConstraintProxy> constraints; if (_checkConstraints.TryGetValue(schema.Id, out constraints)) { foreach (var constraint in constraints.Where(c => c.Kind == ConstraintKind.Check)) { if (Session.Current.CancellationToken.IsCancellationRequested) { break; } constraint.ExecuteConstraint(mel, ctx); } } var parentSchema = schema.SuperClass; if (parentSchema != null && !parentSchema.IsPrimitive) { CheckElement(ctx, mel, parentSchema); } }
public abstract void ExecuteConstraint(IModelElement mel, ConstraintContext ctx);
public override void ExecuteConstraint(IModelElement mel, ConstraintContext ctx) { CheckHandler(mel, ctx, Constraint); }