public override bool Update(ActivityDefinition activityDef)
        {
            bool updated = base.Update(activityDef);

            if (!(activityDef is InteractionDefinition))
            {
                return(updated);
            }

            InteractionDefinition def = (InteractionDefinition)activityDef;

            if (NotNullAndNotEqual(def.CorrectResponsesPattern, this.CorrectResponsesPattern))
            {
                this.CorrectResponsesPattern = def.CorrectResponsesPattern;
                updated = true;
            }

            if (NotNullAndNotEqual(def.Choices, this.Choices))
            {
                this.Choices = def.Choices;
                updated      = true;
            }

            if (NotNullAndNotEqual(def.Scale, this.Scale))
            {
                this.Scale = def.Scale;
                updated    = true;
            }

            if (NotNullAndNotEqual(def.Source, this.Source))
            {
                this.Source = def.Source;
                updated     = true;
            }

            if (NotNullAndNotEqual(def.Target, this.Target))
            {
                this.Target = def.Target;
                updated     = true;
            }

            if (NotNullAndNotEqual(def.Steps, this.Steps))
            {
                this.Steps = def.Steps;
                updated    = true;
            }

            return(updated);
        }
        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is InteractionDefinition))
            {
                return(false);
            }
            InteractionDefinition otherDef = (InteractionDefinition)obj;

            return(base.Equals(obj) &&
                   CommonFunctions.AreListsEqual(correctResponsesPattern, otherDef.correctResponsesPattern) &&
                   CommonFunctions.AreListsEqual(this.Choices, otherDef.Choices) &&
                   CommonFunctions.AreListsEqual(this.Scale, otherDef.Scale) &&
                   CommonFunctions.AreListsEqual(this.Source, otherDef.Source) &&
                   CommonFunctions.AreListsEqual(this.Target, otherDef.Target) &&
                   CommonFunctions.AreListsEqual(this.Steps, otherDef.Steps));
        }