using System; using System.Collections.Generic; namespace Chernobyl.Unity.Creation { /// /// Stores the values produced by the being watched. /// public class EventWarehouse : IObserver { /// The collection where values are to be stored. public EventWarehouse(ICollection collection) { _collection = collection; } /// public void OnNext(T value) => _collection.Add(value); /// public void OnError(Exception error) { } /// public void OnCompleted() { } readonly ICollection _collection; } }