Example #1
0
        public void EndProcessRequest(IAsyncResult result)
        {
            ExTraceGlobals.SpeechRecognitionTracer.TraceDebug((long)this.GetHashCode(), "Entering SpeechRecognitionHandler.EndProcessRequest");
            SpeechRecognitionAsyncResult speechRecognitionAsyncResult = result as SpeechRecognitionAsyncResult;
            HttpResponse response = this.speechRecoProcessor.HttpContext.Response;

            response.TrySkipIisCustomErrors = true;
            response.BufferOutput           = false;
            response.StatusCode             = speechRecognitionAsyncResult.StatusCode;
            if (!string.IsNullOrEmpty(speechRecognitionAsyncResult.StatusDescription))
            {
                response.StatusDescription = speechRecognitionAsyncResult.StatusDescription;
            }
            response.ContentType = "application/json; charset=utf-8";
            response.Write(speechRecognitionAsyncResult.ResponseText);
        }
Example #2
0
 // Token: 0x06001D66 RID: 7526 RVA: 0x000757FC File Offset: 0x000739FC
 private void InvokeClientCallback(object state)
 {
     ExTraceGlobals.SpeechRecognitionTracer.TraceDebug((long)this.GetHashCode(), "Entering SpeechRecognitionProcessor.InvokeClientCallback");
     if (this.clientCallback != null)
     {
         SpeechRecognitionAsyncResult speechRecognitionAsyncResult = state as SpeechRecognitionAsyncResult;
         UmGlobals.ExEvent.LogEvent(UMEventLogConstants.Tuple_SpeechRecoRequestCompleted, null, new object[]
         {
             this.RequestId,
             speechRecognitionAsyncResult.StatusCode,
             CommonUtil.ToEventLogString(speechRecognitionAsyncResult.StatusDescription),
             CommonUtil.ToEventLogString(speechRecognitionAsyncResult.ResponseText),
             speechRecognitionAsyncResult.ThrottlingDelay,
             CommonUtil.ToEventLogString(speechRecognitionAsyncResult.ThrottlingNotEnforcedReason)
         });
         this.clientCallback(state as IAsyncResult);
     }
 }