/// <summary> /// See interface docs. /// </summary> /// <param name="manipulator"></param> public void RemoveTextResponseManipulator(ITextResponseManipulator manipulator) { lock (_SyncLock) { var newList = CollectionHelper.ShallowCopy(_Manipulators); newList.Remove(manipulator); _Manipulators = newList; } }
/// <summary> /// See interface docs. /// </summary> /// <param name="manipulator"></param> public void AddTextResponseManipulator(ITextResponseManipulator manipulator) { if (manipulator == null) { throw new ArgumentNullException(nameof(manipulator)); } lock (_SyncLock) { if (!_Manipulators.Any(r => Object.ReferenceEquals(manipulator, r))) { var newList = CollectionHelper.ShallowCopy(_Manipulators); newList.Add(manipulator); _Manipulators = newList; } } }