using System;

namespace Betfair.Gamex.API
{
	/// <summary>
	/// An object tailored to our needs to be attached with an asyncronous request
	/// </summary>
	public class AsyncRequestState
	{
        /// <summary>
        /// Web request
        /// </summary>
		public object WebRequest;

        /// <summary>
        /// API Adapter
        /// </summary>
		public Adapter Adapter;

        /// <summary>
        /// Async state
        /// </summary>
		public object UserAsyncState;

        /// <summary>
        /// Performance info
        /// </summary>
		public PerformanceTimer Timer;
	}

    /// <summary>
    /// Async response object
    /// </summary>
	public class AsyncResponseState 
	{
        /// <summary>
        /// API Adapter
        /// </summary>
		public Adapter Adapter;

        /// <summary>
        /// Return data object
        /// </summary>
		public object ReturnObject;

        /// <summary>
        /// Async state
        /// </summary>
		public object UserAsyncState;

        /// <summary>
        /// URL Requested
        /// </summary>
		public string RequestedUrl;

        /// <summary>
        /// Xml response
        /// </summary>
		public string ResponsedXml;

        /// <summary>
        /// Xml post data
        /// </summary>
		public string RequestedXml;

        /// <summary>
        /// Time taken for request
        /// </summary>
		public int RequestTimeTaken;

        /// <summary>
        /// Server time processing
        /// </summary>
		public int ServerTimeTaken;
	}
}