using System.Collections;
using AsterNET.Manager.Response;
using AsterNET.Manager.Event;
using System.Collections.Generic;
namespace AsterNET.Manager
{
///
/// Collection of ResponseEvent. Use in events generation actions.
///
public class ResponseEvents
{
private ManagerResponse response;
private List events;
private bool complete;
public ManagerResponse Response
{
get { return this.response; }
set { this.response = value; }
}
public List Events
{
get { return events; }
}
///
/// Indicats if all events have been received.
///
public bool Complete
{
get { return this.complete; }
set { this.complete = value; }
}
/// Creates a new instance.
public ResponseEvents()
{
this.events = new List();
this.complete = false;
}
///
/// 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);
}
}
}
}