/// <summary> /// Removes the specified performed step from the set of <see cref="PerformedStep"/> objects associated with this activity, /// and removes this activity from the set of activities associated with the specified performed step. /// </summary> /// <param name="step"></param> public virtual void RemovePerformedStep(PerformedStep step) { if (_performedSteps.Contains(step)) { _performedSteps.Remove(step); } if (step.Activities.Contains(this)) { step.Activities.Remove(this); } }
/// <summary> /// Adds the specified performed step to the set of <see cref="PerformedStep"/> objects associated with this activity, /// and adds this activity to the set of activities associated with the specified performed step. /// </summary> /// <param name="step"></param> public virtual void AddPerformedStep(PerformedStep step) { // because we are dealing with ISet, no need to worry about duplicate entries, since the set doesn't allow it _performedSteps.Add(step); step.Activities.Add(this); }