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); }
public ActivityDefinition(ActivityDefinition activityDefinition) { this.Extensions = activityDefinition.Extensions; this.Name = activityDefinition.Name; this.Description = activityDefinition.Description; this.Type = activityDefinition.Type; this.InteractionType = activityDefinition.InteractionType; }
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 Activity(string id, ActivityDefinition definition) { this.id = id; this.definition = definition; }
public ActivityDefinition_JsonTarget(ActivityDefinition activityDef) : base(activityDef) { }
public InteractionDefinition(ActivityDefinition def) { this.Update(def); }
public TinCanActivity(String id, ActivityDefinition definition) { this.id = id; this.definition = definition; }
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; }