namespace AsterNET.Manager { /// /// An EventTimeoutException is thrown if a ManagerResponse or some /// ResponseEvents are not completely received within the expected time period.
/// This exception allows you to retrieve the partial result, that is the events /// that have been successfully received before the timeout occured. ///
public class EventTimeoutException:TimeoutException { /// /// Returns the partial result that has been received before the timeout occured.
/// Note: Using the partial result in your application should be avoided /// wherever possible. This is only a hack to handle those versions of /// Asterisk that don't follow the Manager API conventions, for example by /// not sending the correct ActionCompleteEvent. ///
/// /// the ResponseEvents object filled with the parts that have been /// received before the timeout occured. Note: The response attribute /// may be null when no response has been received. /// public ResponseEvents PartialResult { get { return partialResult; } } private ResponseEvents partialResult; /// /// Creates a new EventTimeoutException with the given message and partial result. /// /// message with details about the timeout. /// the ResponseEvents object filled with the parts that /// have been received before the timeout occured. /// public EventTimeoutException(string message, ResponseEvents partialResult): base(message) { this.partialResult = partialResult; } } }