2 types derived from Constraint
System.Activities (2)
Microsoft\VisualBasic\Activities\VisualBasicNameShadowingConstraint.cs (1)
14
sealed class VisualBasicNameShadowingConstraint :
Constraint
System\Activities\Validation\Constraint.cs (1)
85
public sealed class Constraint<T> :
Constraint
135 references to Constraint
System.Activities (57)
Microsoft\VisualBasic\Activities\VisualBasicDesignerHelper.cs (1)
26
public static
Constraint
NameShadowingConstraint
Microsoft\VisualBasic\Activities\VisualBasicNameShadowingConstraint.cs (1)
36
Constraint
.AddValidationError(context, new ValidationError(SR.AmbiguousVBVariableReference(locationReference.Name)));
System\Activities\Activity.cs (8)
37
internal static readonly ReadOnlyCollection<
Constraint
> EmptyConstraints = new ReadOnlyCollection<
Constraint
>(new
Constraint
[0]);
60
Collection<
Constraint
> constraints;
101
protected Collection<
Constraint
> Constraints
107
this.constraints = new Collection<
Constraint
>();
491
internal IList<
Constraint
> RuntimeConstraints
797
internal virtual IList<
Constraint
> InternalGetConstraints()
System\Activities\ActivityBuilder.cs (6)
26
Collection<
Constraint
> constraints;
69
public Collection<
Constraint
> Constraints
75
this.constraints = new Collection<
Constraint
>();
292
Collection<
Constraint
> constraints;
334
public Collection<
Constraint
> Constraints
340
this.constraints = new Collection<
Constraint
>();
System\Activities\ActivityUtilities.cs (2)
26
static Type constraintType = typeof(
Constraint
);
632
IList<
Constraint
> constraints = activity.RuntimeConstraints;
System\Activities\Debugger\DebugController.cs (2)
43
if (!(activityInstance.Activity.RootActivity is
Constraint
)) // Don't debug an activity in a Constraint
52
if (!(activityInstance.Activity.RootActivity is
Constraint
)) // Don't debug an activity in a Constraint
System\Activities\DynamicActivity.cs (2)
68
public new Collection<
Constraint
> Constraints
256
public new Collection<
Constraint
> Constraints
System\Activities\DynamicUpdate\DynamicUpdateServices.cs (1)
233
foreach (
Constraint
constraint in activityDefinition.Constraints)
System\Activities\Statements\CompensableActivity.cs (4)
21
static
Constraint
noCompensableActivityInSecondaryRoot = CompensableActivity.NoCompensableActivityInSecondaryRoot();
200
internal override IList<
Constraint
> InternalGetConstraints()
202
return new List<
Constraint
>(1) { noCompensableActivityInSecondaryRoot };
205
static
Constraint
NoCompensableActivityInSecondaryRoot()
System\Activities\Statements\Compensate.cs (4)
17
static
Constraint
compensateWithNoTarget = Compensate.CompensateWithNoTarget();
87
internal override IList<
Constraint
> InternalGetConstraints()
89
return new List<
Constraint
>(1) { compensateWithNoTarget };
92
static
Constraint
CompensateWithNoTarget()
System\Activities\Statements\Confirm.cs (4)
17
static
Constraint
confirmWithNoTarget = Confirm.ConfirmWithNoTarget();
95
internal override IList<
Constraint
> InternalGetConstraints()
97
return new List<
Constraint
>(1) { confirmWithNoTarget };
100
static
Constraint
ConfirmWithNoTarget()
System\Activities\Statements\NoPersistScope.cs (3)
24
static
Constraint
constraint;
41
static
Constraint
Constraint
70
static
Constraint
NoPersistInScope()
System\Activities\Statements\Rethrow.cs (2)
123
Constraint
.AddValidationError(context, new ValidationError(SR.RethrowMustBeAPublicChild(rethrowActivity.DisplayName), rethrowActivity));
134
Constraint
.AddValidationError(context, new ValidationError(SR.RethrowNotInATryCatch(rethrowActivity.DisplayName), rethrowActivity));
System\Activities\Statements\TransactionScope.cs (2)
146
Constraint
ProcessParentChainConstraints()
232
Constraint
ProcessChildSubtreeConstraints()
System\Activities\Validation\ActivityValidationServices.cs (7)
359
internal static void RunConstraints(ActivityUtilities.ChildActivity childActivity, ActivityUtilities.ActivityCallStack parentChain, IList<
Constraint
> constraints, ProcessActivityTreeOptions options, bool suppressGetChildrenViolations, ref IList<ValidationError> validationErrors)
371
Constraint
constraint = constraints[constraintIndex];
379
inputDictionary[
Constraint
.ToValidateArgumentName] = toValidate;
381
inputDictionary[
Constraint
.ToValidateContextArgumentName] = validationContext;
407
if (results.TryGetValue(
Constraint
.ValidationErrorListArgumentName, out resultValidationErrors))
517
IList<
Constraint
> policyConstraints;
528
IList<
Constraint
> genericTypePolicyConstraints;
System\Activities\Validation\AddValidationError.cs (1)
71
Constraint
.AddValidationError(context, new ValidationError(this.Message.Get(context), isWarning, propertyName));
System\Activities\Validation\AssertValidation.cs (1)
86
Constraint
.AddValidationError(context, new ValidationError(this.Message.Get(context), isWarning, propertyName));
System\Activities\Validation\Constraint.cs (3)
39
throw FxTrace.Exception.AsError(new InvalidOperationException(SR.AddValidationErrorMustBeCalledFromConstraint(typeof(
Constraint
).Name)));
63
throw FxTrace.Exception.AsError(new InvalidOperationException(SR.CannotValidateNullObject(typeof(
Constraint
).Name, this.DisplayName)));
68
throw FxTrace.Exception.AsError(new InvalidOperationException(SR.ValidationContextCannotBeNull(typeof(
Constraint
).Name, this.DisplayName)));
System\Activities\Validation\ValidationSettings.cs (3)
15
IDictionary<Type, IList<
Constraint
>> additionalConstraints;
61
public IDictionary<Type, IList<
Constraint
>> AdditionalConstraints
67
this.additionalConstraints = new Dictionary<Type, IList<
Constraint
>>();
System.Activities.Core.Presentation (13)
System\Activities\Core\Presentation\DesignerMetadata.cs (1)
36
builder.AddCustomAttributes(typeof(Collection<
Constraint
>), new BrowsableAttribute(false));
System\Activities\Core\Presentation\InvokeDelegateValidationFeature.cs (4)
24
private List<
Constraint
> constraints;
32
protected override IList<
Constraint
> DesignTimeConstraints
38
this.constraints = new List<
Constraint
> { this.CreateCheckDelegateRule(this.editingContext) };
51
private
Constraint
CreateCheckDelegateRule(EditingContext editingContext)
System\ServiceModel\Activities\Presentation\ReceiveReplyValidationFeature.cs (4)
18
List<
Constraint
> constraints;
25
protected override IList<
Constraint
> DesignTimeConstraints
31
this.constraints = new List<
Constraint
> { UnrootedRequestRule() };
37
Constraint
UnrootedRequestRule()
System\ServiceModel\Activities\Presentation\SendReplyValidationFeature.cs (4)
18
List<
Constraint
> constraints;
25
protected override IList<
Constraint
> DesignTimeConstraints
31
this.constraints = new List<
Constraint
> { UnrootedRequestRule() };
37
Constraint
UnrootedRequestRule()
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\DesignTimeValidationFeature.cs (1)
35
protected abstract IList<
Constraint
> DesignTimeConstraints
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicReferenceValidationFeature.cs (1)
28
validationService.Settings.AdditionalConstraints.Add(VisualBasicReferenceType, new List<
Constraint
> { VisualBasicDesignerHelper.NameShadowingConstraint });
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicValueValidationFeature.cs (1)
28
validationService.Settings.AdditionalConstraints.Add(VisualBasicValueType, new List<
Constraint
> { VisualBasicDesignerHelper.NameShadowingConstraint });
System.ServiceModel.Activities (58)
System\ServiceModel\Activities\ContractValidationHelper.cs (37)
162
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(action, "Fault Action", targetFault.Action, targetOperation.Name, targetOperation.DeclaringContract.Name)));
166
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(NamingHelper.XmlName(name), "Fault Name", targetFault.Name, targetOperation.Name, targetOperation.DeclaringContract.Name)));
170
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(targetOperation.DeclaringContract.Namespace, "Fault Namespace", targetFault.Namespace, targetOperation.Name, targetOperation.DeclaringContract.Name)));
174
Constraint
.AddValidationError(context, new ValidationError(SR2.ProtectionLevelNotSupported(targetOperation.Name, targetOperation.DeclaringContract.Name)));
187
Constraint
.AddValidationError(context, new ValidationError(SR2.FaultTypeMismatch(faultType.FullName, targetOperation.Name, targetOperation.DeclaringContract.Name)));
197
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(overridingAction, "Action", targetMessage.Action, targetOperation.Name, targetOperation.DeclaringContract.Name)));
212
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(declaredMessageType.ToString(), "type", targetMessage.MessageType.ToString(), operation.Name, operation.DeclaringContract.Name)));
217
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(declaredMessageType.ToString(), "type", "null", operation.Name, operation.DeclaringContract.Name)));
226
Constraint
.AddValidationError(context, new ValidationError(SR2.BodyCannotBeNull));
234
Constraint
.AddValidationError(context, new ValidationError(SR2.ExtraReturnValue));
238
Constraint
.AddValidationError(context, new ValidationError(SR2.FirstParameterDoesnotMatchTheReturnValue(declaredMessageType.FullName, targetMessage.Body.ReturnValue.Type.Name, operation.Name, operation.DeclaringContract.Name)));
245
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterNumberMismatch(declaredMessageType.FullName, operation.Name, operation.DeclaringContract.Name)));
249
Constraint
.AddValidationError(context, new ValidationError(SR2.MessageContentCannotHaveMoreThanOneParameter(operation.Name, operation.DeclaringContract.Name)));
255
Constraint
.AddValidationError(context, new ValidationError(SR2.MessageTypeMismatch(targetMessage.Body.Parts[0].Type.FullName, operation.Name, operation.DeclaringContract.Name)));
272
Constraint
.AddValidationError(context, new ValidationError(SR2.MessageHeaderNotSupported(operation.Name, operation.DeclaringContract.Name)));
276
Constraint
.AddValidationError(context, new ValidationError(SR2.MessagePropertyIsNotSupported(operation.Name, operation.DeclaringContract.Name)));
280
Constraint
.AddValidationError(context, new ValidationError(SR2.ProtectionLevelIsNotSupported(operation.Name, operation.DeclaringContract.Name)));
287
Constraint
.AddValidationError(context, new ValidationError(SR2.MessageCannotBeEmpty(operation.Name, operation.DeclaringContract.Name)));
328
Constraint
.AddValidationError(context, new ValidationError(SR2.NotSupportMoreThanOneParametersInMessageContract(operation.Name, operation.DeclaringContract.Name)));
336
Constraint
.AddValidationError(context, new ValidationError(SR2.WrapperNotSupportedInMessageContract(operation.Name, operation.DeclaringContract.Name)));
341
Constraint
.AddValidationError(context, new ValidationError(SR2.WrapperNotSupportedInMessageContract(operation.Name, operation.DeclaringContract.Name)));
346
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterNumberMismatch(declaredMessageType.FullName, operation.Name, operation.DeclaringContract.Name)));
350
Constraint
.AddValidationError(context, new ValidationError(SR2.MessageContentCannotHaveMoreThanOneParameter(operation.Name, operation.DeclaringContract.Name)));
362
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(partName, "parameter name", targetPart.Name, operation.Name, operation.DeclaringContract.Name)));
366
Constraint
.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(partNamespace, "parameter namespace", targetPart.Namespace, operation.Name, operation.DeclaringContract.Name)));
372
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(declaredMessageType.FullName, targetPart.Type.FullName, operation.Name, operation.DeclaringContract.Name)));
376
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(TypeHelper.VoidType.FullName, targetPart.Type.FullName, operation.Name, operation.DeclaringContract.Name)));
381
Constraint
.AddValidationError(context, new ValidationError(SR2.ProtectionLevelIsNotSupported(operation.Name, operation.DeclaringContract.Name)));
400
Constraint
.AddValidationError(context, new ValidationError(SR2.UnwrappedMessageNotSupported(targetOperation.Name, targetOperation.DeclaringContract.Name)));
404
Constraint
.AddValidationError(context, new ValidationError(SR2.UnwrappedMessageNotSupported(targetOperation.Name, targetOperation.DeclaringContract.Name)));
420
Constraint
.AddValidationError(context, new ValidationError(SR2.FirstParameterDoesnotMatchTheReturnValue(argument.ArgumentType.FullName, targetMessageBody.ReturnValue.Type.FullName, targetOperation.Name, targetOperation.DeclaringContract.Name)));
426
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterPositionMismatch(targetMessageBody.ReturnValue.Name, targetOperation.Name, targetOperation.DeclaringContract.Name, "0")));
431
Constraint
.AddValidationError(context, new ValidationError(SR2.ReturnValueMissing(targetMessageBody.ReturnValue.Type.FullName, targetOperation.Name, targetOperation.DeclaringContract.Name)));
444
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(targetPart.Name, targetPart.Type.FullName, targetOperation.Name, targetOperation.DeclaringContract.Name)));
450
Constraint
.AddValidationError(context, new ValidationError(SR2.ParameterPositionMismatch(targetPart.Name, targetOperation.Name, targetOperation.DeclaringContract.Name, benchmarkIndex)));
455
Constraint
.AddValidationError(context, new ValidationError(SR2.MissingParameter(targetPart.Name, targetOperation.Name, targetOperation.DeclaringContract.Name)));
470
Constraint
.AddValidationError(context, new ValidationError(SR2.ExtraParameter(name, targetOperation.Name, targetOperation.DeclaringContract.Name)));
System\ServiceModel\Activities\ReceiveMessageContent.cs (1)
218
Constraint
.AddValidationError(context, new ValidationError(SR.MisuseOfMessageContent(targetOperation.Name, targetOperation.DeclaringContract.Name)));
System\ServiceModel\Activities\ReceiveParametersContent.cs (1)
186
Constraint
.AddValidationError(context, new ValidationError(SR.MisuseOfParameterContent(targetOperation.Name, targetOperation.DeclaringContract.Name)));
System\ServiceModel\Activities\SendMessageContent.cs (1)
235
Constraint
.AddValidationError(context, new ValidationError(SR.MisuseOfMessageContent(targetOperation.Name, targetOperation.DeclaringContract.Name)));
System\ServiceModel\Activities\SendParametersContent.cs (1)
207
Constraint
.AddValidationError(context, new ValidationError(SR.MisuseOfParameterContent(targetOperation.Name, targetOperation.DeclaringContract.Name)));
System\ServiceModel\Activities\TransactedReceiveScope.cs (1)
91
Constraint
ProcessChildSubtreeConstraints()
System\ServiceModel\Activities\WorkflowService.cs (16)
209
static void AddAdditionalConstraint(ValidationSettings workflowServiceSettings, Type constraintType,
Constraint
constraint)
211
IList<
Constraint
> constraintList;
218
constraintList = new List<
Constraint
>(1)
304
foreach (KeyValuePair<Type, IList<
Constraint
>> constrants in source.AdditionalConstraints)
308
clonedSettings.AdditionalConstraints.Add(constrants.Key, new List<
Constraint
>(constrants.Value));
786
Constraint
GetContractFirstValidationReceiveConstraints()
819
Constraint
GetContractFirstValidationSendReplyConstraints()
1054
Constraint
.AddValidationError(context, new ValidationError(SR.MissingOperationName(this.DisplayName)));
1084
Constraint
.AddValidationError(context, new ValidationError(SR.OperationDoesNotExistInContract(receiveActivity.OperationName, contractName, contractNamespace)));
1119
Constraint
.AddValidationError(context, new ValidationError(SR.TargetContractCannotBeOneWayWithTransactionFlow(targetOperation.Name, targetOperation.DeclaringContract.Name)));
1125
Constraint
.AddValidationError(context, new ValidationError(SR.ReceiveIsNotInTRS(targetOperation.Name, targetOperation.DeclaringContract.Name)));
1132
Constraint
.AddValidationError(context, new ValidationError(SR.ReceiveIsInTRSWhenTransactionFlowNotAllowed(targetOperation.Name, targetOperation.DeclaringContract.Name), true));
1144
Constraint
.AddValidationError(context, new ValidationError(SR.PropertyMismatch(receiveActivity.SerializerOption.ToString(), "SerializerOption", targetSerializerOption.ToString(), targetOperation.DeclaringContract.Name, targetSerializerOption.ToString())));
1154
Constraint
.AddValidationError(context, new ValidationError(SR.PropertyMismatch(receiveProtectionLevelString, "ProtectionLevel", targetProtectionLevelString, targetOperation.Name, targetOperation.DeclaringContract.Name)));
1171
Constraint
.AddValidationError(context, new ValidationError(SR.MissingKnownTypes(targetType.FullName, targetOperation.Name, targetOperation.DeclaringContract.Name)));
1267
Constraint
.AddValidationError(context, new ValidationError(SR.OnewayContractIsImplementedAsTwoWay(property.Operation.Name, contractName)));
System.Workflow.Runtime (4)
System\Activities\Statements\Interop.cs (4)
867
Constraint
ProcessAdvancedConstraints()
1023
Constraint
.AddValidationError(context, new ValidationError(error.ErrorText, error.IsWarning, error.PropertyName));
1140
Constraint
.AddValidationError(context, new ValidationError(message));
1151
Constraint
.AddValidationError(context, new ValidationError(message));