// Token: 0x06001CAB RID: 7339 RVA: 0x00072A34 File Offset: 0x00070C34
        public virtual void ProcessAndFormatSpeechRecognitionResults(string result, out string jsonResponse, out SpeechRecognitionProcessor.SpeechHttpStatus httpStatus)
        {
            ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string>((long)this.GetHashCode(), "Entering FindPeopleSearchRecognitionResultHandler.ProcessAndFormatSpeechRecognitionResults with results '{0}'", result);
            jsonResponse = null;
            httpStatus   = SpeechRecognitionProcessor.SpeechHttpStatus.Success;
            List <Persona> uniquePersonaList = this.GetUniquePersonaList(result);

            jsonResponse = SpeechRecognitionResultHandler.JsonSerialize(uniquePersonaList.ToArray());
            ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string>((long)this.GetHashCode(), "Persona array json:{0}", jsonResponse);
        }
Exemple #2
0
 // Token: 0x06001D62 RID: 7522 RVA: 0x0007551C File Offset: 0x0007371C
 private void HandleRecoResults(object state)
 {
     ExTraceGlobals.SpeechRecognitionTracer.TraceDebug((long)this.GetHashCode(), "Entering SpeechRecognitionProcessor.HandleRecoResults");
     try
     {
         SpeechRecognitionProcessor.SpeechProcessorAsyncCompletedArgs speechProcessorAsyncCompletedArgs = (SpeechRecognitionProcessor.SpeechProcessorAsyncCompletedArgs)state;
         string responseText;
         SpeechRecognitionProcessor.SpeechHttpStatus httpStatus;
         SpeechRecognitionResultHandler.HandleRecoResult(speechProcessorAsyncCompletedArgs.ResponseText, this.parameters, this.HttpContext, this.userContext, out responseText, out httpStatus);
         SpeechRecognitionProcessor.SpeechProcessorAsyncCompletedArgs args = new SpeechRecognitionProcessor.SpeechProcessorAsyncCompletedArgs(responseText, httpStatus);
         this.CompleteRequest(args);
     }
     catch (ArgumentException e)
     {
         this.HandleException(e, SpeechRecognitionProcessor.SpeechHttpStatus.BadRequest);
     }
     catch (Exception e2)
     {
         this.HandleUnexpectedException(e2);
     }
 }
        public override void ProcessAndFormatSpeechRecognitionResults(string result, out string jsonResponse, out SpeechRecognitionProcessor.SpeechHttpStatus httpStatus)
        {
            ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string>((long)this.GetHashCode(), "Entering EmailPeopleSearchRecognitionResultHandler.ProcessAndFormatSpeechRecognitionResults with results '{0}'", result);
            jsonResponse = null;
            httpStatus   = SpeechRecognitionProcessor.SpeechHttpStatus.Success;
            List <Persona> uniquePersonaList = base.GetUniquePersonaList(result);
            List <Persona> list = new List <Persona>();

            foreach (Persona persona in uniquePersonaList)
            {
                if (persona.EmailAddresses != null && persona.EmailAddresses.Length > 0)
                {
                    list.Add(persona);
                }
            }
            if (list.Count == 0)
            {
                httpStatus = SpeechRecognitionProcessor.SpeechHttpStatus.NoContactWithEmailAddress;
                return;
            }
            jsonResponse = SpeechRecognitionResultHandler.JsonSerialize(list.ToArray());
            ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string>((long)this.GetHashCode(), "Persona array json:{0}", jsonResponse);
        }
Exemple #4
0
 // Token: 0x06001CA3 RID: 7331 RVA: 0x0007236F File Offset: 0x0007056F
 public static string JsonSerialize(object obj)
 {
     return(SpeechRecognitionResultHandler.JsonSerialize(obj));
 }
Exemple #5
0
 // Token: 0x06001CA2 RID: 7330 RVA: 0x00072361 File Offset: 0x00070561
 public static DayTimeDurationRecoResult JsonDeserialize(string result, Type targetType)
 {
     return((DayTimeDurationRecoResult)SpeechRecognitionResultHandler.JsonDeserialize(result, targetType));
 }
Exemple #6
0
 // Token: 0x06001C93 RID: 7315 RVA: 0x0007227D File Offset: 0x0007047D
 public static CombinedScenarioRecoResult JsonDeserialize(string result, Type targetType)
 {
     return((CombinedScenarioRecoResult)SpeechRecognitionResultHandler.JsonDeserialize(result, targetType));
 }