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); }