public override ValidationErrorCollection Validate(ValidationManager manager, object obj) { ValidationErrorCollection errors = base.Validate(manager, obj); ReplicatorActivity activity = obj as ReplicatorActivity; if (activity == null) { throw new ArgumentException(SR.GetString("Error_UnexpectedArgumentType", new object[] { typeof(ReplicatorActivity).FullName }), "obj"); } if (activity.EnabledActivities.Count != 1) { errors.Add(new ValidationError(SR.GetString("Error_GeneratorShouldContainSingleActivity"), 0x526)); } return(errors); }
public override ValidationErrorCollection Validate(ValidationManager manager, object obj) { ValidationErrorCollection validationErrors = base.Validate(manager, obj); ReplicatorActivity replicator = obj as ReplicatorActivity; if (replicator == null) { throw new ArgumentException(SR.GetString(SR.Error_UnexpectedArgumentType, typeof(ReplicatorActivity).FullName), "obj"); } if ((replicator.EnabledActivities.Count != 1)) { validationErrors.Add(new ValidationError(SR.GetString(SR.Error_GeneratorShouldContainSingleActivity), ErrorNumbers.Error_GeneratorShouldContainSingleActivity)); } return(validationErrors); }
internal ReplicatorChildInstanceList(ReplicatorActivity replicatorActivity) { this.replicatorActivity = replicatorActivity; }