// Token: 0x06001CB3 RID: 7347 RVA: 0x00072DCC File Offset: 0x00070FCC private static Dictionary <string, PeopleSpeechPersonObject> RetrieveContactFromXMLHelper(string result, string contactSearchElementName, string identiferElementName, string galLinkIdElementName, FindPeopleSpeechRecognitionResultHandler.AddContactToDictionary addToDictionary) { Dictionary <string, PeopleSpeechPersonObject> dictionary = new Dictionary <string, PeopleSpeechPersonObject>(); using (XmlReader xmlReader = XmlReader.Create(new StringReader(result))) { if (xmlReader.ReadToFollowing(contactSearchElementName)) { using (XmlReader xmlReader2 = xmlReader.ReadSubtree()) { while (xmlReader2.ReadToFollowing("Alternate")) { PeopleSpeechPersonObject peopleSpeechPersonObject = new PeopleSpeechPersonObject(); if (xmlReader2.MoveToAttribute("confidence")) { peopleSpeechPersonObject.Confidence = xmlReader2.ReadContentAsFloat(); } if (xmlReader2.ReadToFollowing(identiferElementName)) { peopleSpeechPersonObject.Identifier = xmlReader2.ReadString(); } if (xmlReader2.ReadToFollowing(galLinkIdElementName)) { peopleSpeechPersonObject.GALLinkId = xmlReader2.ReadString(); } addToDictionary(dictionary, peopleSpeechPersonObject); } } } } return(dictionary); }
// Token: 0x06001CB4 RID: 7348 RVA: 0x00072E94 File Offset: 0x00071094 private static void AddContactToUniqueDictionary(string key, PeopleSpeechPersonObject personObject, Dictionary <string, PeopleSpeechPersonObject> contactPersons) { ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string, float, string>(0L, "Entering PeopleSearchRecognitionResultHandler.AddPersonalContactToUniqueDictionary with Person:'{0}', confidence:'{1}', LinkId: '{2}'", personObject.Identifier, personObject.Confidence, personObject.GALLinkId); PeopleSpeechPersonObject peopleSpeechPersonObject; if (!contactPersons.TryGetValue(key, out peopleSpeechPersonObject)) { ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <string>(0L, "Person:'{0}' not in unique dictionary, adding to dictionary", personObject.Identifier); contactPersons.Add(key, personObject); return; } if (personObject.Confidence > peopleSpeechPersonObject.Confidence) { ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <float, float>(0L, "uniquePersonObject confidence '{0}' is lower than personObject confidence '{0}', updating the value of the uniquePersonObject", peopleSpeechPersonObject.Confidence, personObject.Confidence); peopleSpeechPersonObject.Confidence = personObject.Confidence; } contactPersons[key] = peopleSpeechPersonObject; }