Definition of an activity, a core statement piece.
Inheritance: Extensible
コード例 #1
0
        public virtual bool Update(ActivityDefinition def)
        {
            bool updated = false;

            if (def == null)
            {
                return(false);
            }

            if (/*def.Type != null &&*/ !def.type.Equals(this.type))
            {
                this.Type = def.Type;
                updated   = true;
            }
            if (def.Name != null && def.Name.Count > 0 && !CommonFunctions.AreDictionariesEqual(this.name, def.name))
            {
                this.name = def.Name;
                updated   = true;
            }
            if (def.description != null && def.description.Count > 0 && !CommonFunctions.AreDictionariesEqual(this.description, def.description))
            {
                this.description = def.Description;
                updated          = true;
            }
            if (def.InteractionType != null && !def.InteractionType.Equals(this.InteractionType))
            {
                this.InteractionType = def.InteractionType;
                updated = true;
            }

            return(updated);
        }
コード例 #2
0
 public ActivityDefinition(ActivityDefinition activityDefinition)
 {
     this.Extensions      = activityDefinition.Extensions;
     this.Name            = activityDefinition.Name;
     this.Description     = activityDefinition.Description;
     this.Type            = activityDefinition.Type;
     this.InteractionType = activityDefinition.InteractionType;
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 public Activity(string id, ActivityDefinition definition)
 {
     this.id = id;
     this.definition = definition;
 }
コード例 #5
0
 public ActivityDefinition_JsonTarget(ActivityDefinition activityDef)
     : base(activityDef)
 {
 }
コード例 #6
0
 public InteractionDefinition(ActivityDefinition def)
 {
     this.Update(def);
 }
コード例 #7
0
 public TinCanActivity(String id, ActivityDefinition definition)
 {
     this.id = id;
     this.definition = definition;
 }
コード例 #8
0
 public ActivityDefinition(ActivityDefinition activityDefinition)
 {
     this.Extensions = activityDefinition.Extensions;
     this.Name = activityDefinition.Name;
     this.Description = activityDefinition.Description;
     this.Type = activityDefinition.Type;
     this.InteractionType = activityDefinition.InteractionType;
 }
コード例 #9
0
        public virtual bool Update(ActivityDefinition def)
        {
            bool updated = false;
            if (def == null)
            {
                return false;
            }

            if (/*def.Type != null &&*/ !def.type.Equals(this.type))
            {
                this.Type = def.Type;
                updated = true;
            }
            if (def.Name != null && def.Name.Count > 0 && !CommonFunctions.AreDictionariesEqual(this.name, def.name))
            {
                this.name = def.Name;
                updated = true;
            }
            if (def.description != null && def.description.Count > 0 && !CommonFunctions.AreDictionariesEqual(this.description, def.description))
            {
                this.description = def.Description;
                updated = true;
            }
            if (def.InteractionType != null && !def.InteractionType.Equals(this.InteractionType))
            {
                this.InteractionType = def.InteractionType;
                updated = true;
            }

            return updated;
        }
コード例 #10
0
 public Activity(string id, ActivityDefinition definition)
 {
     this.id         = id;
     this.definition = definition;
 }