/// <summary>
        /// Helper method to initiate the call that speak method.
        /// </summary>
        /// <param name="clientIdentity">The hawaii client identity.</param>
        /// <param name="text">The text to be converted to speech.</param>
        /// <param name="onComplete">Specifies an "on complete" delegate callback.</param>
        /// <param name="stateObject">Specifies a user-defined object.</param>
        /// <param name="language">The language of the speech.</param>        
        /// <param name="format">The stream format of the content type. Currently "audio/wav" and "audio/mp3" are available. The default value is "audio/wav".</param>
        /// <param name="options">Specifies the quality of the audio signals. Currently "MaxQuality" and "MinSize" are available. The default value is "MinSize".</param>
        private static void SpeakAsync(
            ClientIdentity clientIdentity,
            string text,
            ServiceAgent<SpeakResult>.OnCompleteDelegate onComplete,
            object stateObject,
            string language = "",
            string format = "audio/wav",
            string options = "MinSize")
        {
            SpeakAgent agent = new SpeakAgent(
                TranslatorService.HostName,
                clientIdentity,
                text,
                stateObject,
                language,
                format,
                options);

            agent.ProcessRequest(onComplete);
        }
        /// <summary>
        /// Calls the PredictLocation service method
        /// </summary>
        /// <param name="clientIdentity">The hawaii client identity.</param>
        /// <param name="request">request parameter to the method</param>
        /// <param name="onComplete">on complete callback</param>
        /// <param name="stateObject">Optional correlation user state object</param>
        private static void PredictLocationAsync(
            ClientIdentity clientIdentity,
            PredictLocationRequest request,
            ServiceAgent<PredictLocationResult>.OnCompleteDelegate onComplete,
            object stateObject)
        {
            PredictLocationAgent agent = new PredictLocationAgent(
                PathPredictionService.ServicePath,
                clientIdentity,
                request,
                stateObject);

            agent.ProcessRequest(onComplete);
        }
        /// <summary>
        /// Helper method to initiate the call that gets the supported languages for speak method.
        /// </summary>
        /// <param name="clientIdentity">The hawaii client identity.</param>
        /// <param name="onComplete">Specifies an "on complete" delegate callback.</param>
        /// <param name="stateObject">Specifies a user-defined object.</param>
        /// <param name="locale">The system locale</param>       
        private static void GetLanguagesForSpeakAsync(
            ClientIdentity clientIdentity,
            ServiceAgent<GetLanguagesForSpeakResult>.OnCompleteDelegate onComplete,
            object stateObject,
            string locale = "en")
        {
            GetLanguagesForSpeakAgent agent = new GetLanguagesForSpeakAgent(
                TranslatorService.HostName,
                clientIdentity,
                stateObject,
                locale);

            agent.ProcessRequest(onComplete);
        }
        /// <summary>
        /// Helper method to initiate the call that translate method.
        /// </summary>
        /// <param name="clientIdentity">The hawaii client identity.</param>
        /// <param name="text">The text to be translated.</param>
        /// <param name="to">The language translate to.</param>
        /// <param name="onComplete">Specifies an "on complete" delegate callback.</param>
        /// <param name="stateObject">Specifies a user-defined object.</param>
        /// <param name="from">The language translate from.</param>        
        private static void TranslateAsync(
           ClientIdentity clientIdentity,
           string text,
           string to,
           ServiceAgent<TranslateResult>.OnCompleteDelegate onComplete,
           object stateObject,
           string from = "")
        {
            TranslateAgent agent = new TranslateAgent(
                TranslatorService.HostName,
                clientIdentity,
                text,
                to,
                stateObject,
                from);

            agent.ProcessRequest(onComplete);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="clientID"></param>
        /// <param name="rows"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult SendRowsAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid clientID,
            IEnumerable<DataRow_Wire> rows,
            ServiceAgent<SendRowsResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            SendRowsAgent agent = new SendRowsAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                clientID,
                rows,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="managementID"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult WipeSessionAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid managementID,
            ServiceAgent<WipeSessionResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            WipeSessionAgent agent = new WipeSessionAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                managementID,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="userName"></param>
        /// <param name="userEmail"></param>
        /// <param name="deviceName"></param>
        /// <param name="forceRejoin"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult JoinSessionAsync(
            ClientIdentity identity,
            Guid meetingToken,
            string userName,
            string userEmail,
            string deviceName,
            bool forceRejoin,
            ServiceAgent<JoinSessionResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            JoinSessionAgent agent = new JoinSessionAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                userName,
                userEmail,
                deviceName,
                forceRejoin,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="managementID"></param>
        /// <param name="attendeesAdd"></param>
        /// <param name="attendeesRemove"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult ModifySessionAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid managementID,
            IEnumerable<string> attendeesAdd,
            IEnumerable<string> attendeesRemove,
            ServiceAgent<ModifySessionResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            if (attendeesAdd == null)
            {
                attendeesAdd = new List<string>();
            }
            if (attendeesRemove == null)
            {
                attendeesRemove = new List<string>();
            }

            ModifySessionAgent agent = new ModifySessionAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                managementID,
                attendeesAdd,
                attendeesRemove,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="clientID"></param>
        /// <param name="lastKnownRowTime"></param>
        /// <param name="timeOut"></param>
        /// <param name="cached"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult GetRowsAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid clientID,
            long lastKnownRowTime,
            int timeOut,
            bool cached,
            ServiceAgent<GetRowsResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            GetRowsAgent agent = new GetRowsAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                clientID,
                lastKnownRowTime,
                timeOut,
                cached,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="managementID"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult EnumSessionsAsync(
            ClientIdentity identity,
            Guid managementID,
            ServiceAgent<EnumSessionsResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            EnumSessionsAgent agent = new EnumSessionsAgent(
                SmashClientREST.HostName,
                identity,
                managementID,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="clientID"></param>
        /// <param name="fileExtension"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult CreateBlobAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid clientID,
            string fileExtension,
            ServiceAgent<CreateBlobResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            CreateBlobAgent agent = new CreateBlobAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                clientID,
                fileExtension,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionID"></param>
        /// <param name="clientID"></param>
        /// <param name="blobAddress"></param>
        /// <param name="blobSharedSignature"></param>
        /// <param name="page"></param>
        /// <param name="id"></param>
        /// <param name="close"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult AddPageToBlobAsync(
            ClientIdentity identity,
            Guid meetingToken,
            Guid sessionID,
            Guid clientID,
            string blobAddress,
            string blobSharedSignature,
            byte[] page,
            int id,
            bool close,
            ServiceAgent<AddPageToBlobResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            AddPageToBlobAgent agent = new AddPageToBlobAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionID,
                clientID,
                blobAddress,
                blobSharedSignature,
                page,
                id,
                close,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="identity"></param>
        /// <param name="meetingToken"></param>
        /// <param name="sessionName"></param>
        /// <param name="ownerName"></param>
        /// <param name="ownerEmail"></param>
        /// <param name="attendees"></param>
        /// <param name="lifetime"></param>
        /// <param name="managementID"></param>
        /// <param name="onComplete"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public static IAsyncResult CreateSessionAsync(
            ClientIdentity identity,
            Guid meetingToken,
            string sessionName,
            string ownerName,
            string ownerEmail,
            IEnumerable<string> attendees,
            TimeSpan lifetime,
            Guid managementID,
            ServiceAgent<CreateSessionResponse>.OnCompleteDelegate onComplete,
            object state)
        {
            CreateSessionAgent agent = new CreateSessionAgent(
                SmashClientREST.HostName,
                identity,
                meetingToken,
                sessionName,
                ownerName,
                ownerEmail,
                attendees,
                lifetime,
                managementID,
                state);

            return agent.AbortableProcessRequest(onComplete, state);
        }