using System.Collections; using System.Collections.Generic; using AsterNET.Manager.Event; using AsterNET.Manager.Response; namespace AsterNET.Manager { /// /// Collection of ResponseEvent. Use in events generation actions. /// public class ResponseEvents { private readonly List events; /// Creates a new instance. public ResponseEvents() { events = new List(); Complete = false; } public ManagerResponse Response { get; set; } public List Events { get { return events; } } /// /// Indicats if all events have been received. /// public bool Complete { get; set; } /// /// Adds a ResponseEvent that has been received. /// /// the ResponseEvent that has been received. public void AddEvent(ResponseEvent e) { lock (((IList) events).SyncRoot) { events.Add(e); } } } }