/// <summary> /// Removes the load data for the analysis case. /// This method should be used when removing multiple loads to reduce API calls to the application. /// </summary> /// <param name="loads">The loads.</param> public void Remove(LoadsTimeHistory loads) { foreach (var loadPatternTuple in loads) { _items.Remove(loadPatternTuple); } }
/// <summary> /// Adds the load data for the analysis case. /// This method should be used when adding multiple loads to reduce API calls to the application. /// </summary> /// <param name="loads">The loads.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> public bool AddUnique(LoadsTimeHistory loads) { bool loadsAdded = false; foreach (var load in loads) { if (_items.Contains(load)) { continue; } _items.Add(load); loadsAdded = true; } return(loadsAdded); }