Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 internal ReplicatorChildInstanceList(ReplicatorActivity replicatorActivity)
 {
     this.replicatorActivity = replicatorActivity;
 }