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 .
///
public ResponseEvents()
{
events = new List();
Complete = false;
}
///
/// Gets or sets the response.
///
public ManagerResponse Response { get; set; }
///
/// Gets the list of events.
///
public List Events
{
get { return events; }
}
///
/// Indicates if all events have been received.
///
public bool Complete { get; set; }
///
/// Adds a ResponseEvent that has been received.
///
///
public void AddEvent(ResponseEvent e)
{
lock (((IList) events).SyncRoot)
{
events.Add(e);
}
}
}
}