Esempio n. 1
0
        /// <summary>
        /// This function is called by the client on the users computer when they request a reverse echo
        /// </summary>
        /// <param name="reverseText">The text to be sent to the service bus</param>
        /// <returns>An html page containing the response from the service bus</returns>
        public ActionResult ReverseEcho(string reverseText)
        {
            ReverseEchoRequest   request = new ReverseEchoRequest(reverseText, Globals.getUser());
            ServiceBusResponse   response;
            ServiceBusConnection connection = ConnectionManager.getConnectionObject(Globals.getUser());

            if (connection == null)
            {
                response = new ServiceBusResponse(false, "Error: You must be logged in to use the echo reverse functionality.");
            }
            else
            {
                response = connection.echoReverse(request);
            }

            ViewBag.ReverseResponse = response.response;

            return(View("Index"));
        }