// Token: 0x06001CB9 RID: 7353 RVA: 0x00073270 File Offset: 0x00071470
        private List <Persona> GetPersonalContactPersonas(string result, out List <string> galLinksToRemove)
        {
            galLinksToRemove = new List <string>();
            Dictionary <string, PeopleSpeechPersonObject> personalContactPersons = FindPeopleSpeechRecognitionResultHandler.RetrieveUniquePersonalContactsFromXML(result, galLinksToRemove);
            List <Persona> personas = new List <Persona>(personalContactPersons.Count);

            if (personalContactPersons.Count > 0)
            {
                CallContext callContext = null;
                try
                {
                    callContext = FindPeopleSpeechRecognitionResultHandler.CreateAndSetCallContext(this.httpContext);
                    this.userContext.LockAndReconnectMailboxSession(3000);
                    ExchangeVersion.ExecuteWithSpecifiedVersion(ExchangeVersion.Exchange2012, delegate
                    {
                        ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <int>((long)this.GetHashCode(), "Creating Personas from Person Id, PersonId count:{0}", personalContactPersons.Count);
                        foreach (string text in personalContactPersons.Keys)
                        {
                            PersonId personId        = PersonId.Create(text);
                            ItemId personaId         = IdConverter.PersonaIdFromPersonId(this.userContext.MailboxSession.MailboxGuid, personId);
                            Persona persona          = Persona.LoadFromPersonaId(this.userContext.MailboxSession, null, personaId, FindPeopleSpeechRecognitionResultHandler.DefaultPersonaShape, null, null);
                            persona.SpeechConfidence = personalContactPersons[text].Confidence;
                            personas.Add(persona);
                        }
                        ExTraceGlobals.SpeechRecognitionTracer.TraceDebug <int>((long)this.GetHashCode(), "Created Personas from Person Id, PersonId count:{0}", personalContactPersons.Count);
                    });
                }
                finally
                {
                    if (this.userContext.MailboxSessionLockedByCurrentThread())
                    {
                        this.userContext.UnlockAndDisconnectMailboxSession();
                    }
                    FindPeopleSpeechRecognitionResultHandler.DisposeContext(callContext);
                }
            }
            return(personas);
        }
        protected NewMailNotificationPayload BindToItemAndCreatePayload(NewMailNotification notification)
        {
            NewMailNotificationPayload result;

            try
            {
                base.UserContext.LockAndReconnectMailboxSession(3000);
                MessageItem newMessage             = null;
                NewMailNotificationPayload payload = new NewMailNotificationPayload();
                payload.Source         = MailboxLocation.FromMailboxContext(base.UserContext);
                payload.SubscriptionId = base.SubscriptionId;
                try
                {
                    newMessage = Item.BindAsMessage(base.UserContext.MailboxSession, notification.NewMailItemId, this.GetAdditionalPropsToLoad());
                    ExchangeVersion.ExecuteWithSpecifiedVersion(ExchangeVersion.Exchange2012, delegate
                    {
                        payload.ItemId         = IdConverter.ConvertStoreItemIdToItemId(newMessage.Id, this.UserContext.MailboxSession).Id;
                        payload.ConversationId = IdConverter.ConversationIdToEwsId(this.UserContext.MailboxSession.MailboxGuid, newMessage.GetConversation(new PropertyDefinition[0]).ConversationId);
                    });
                    if (newMessage != null)
                    {
                        if (newMessage.From != null && newMessage.From.DisplayName != null)
                        {
                            payload.Sender = newMessage.From.DisplayName;
                        }
                        if (newMessage.Subject != null)
                        {
                            payload.Subject = newMessage.Subject;
                        }
                        string previewText = newMessage.Body.PreviewText;
                        if (previewText != null)
                        {
                            payload.PreviewText = previewText;
                        }
                        this.OnPayloadCreated(newMessage, payload);
                        result = payload;
                    }
                    else
                    {
                        result = null;
                    }
                }
                catch (ObjectNotFoundException)
                {
                    result = null;
                }
                finally
                {
                    if (newMessage != null)
                    {
                        newMessage.Dispose();
                    }
                }
            }
            finally
            {
                if (base.UserContext.MailboxSessionLockedByCurrentThread())
                {
                    base.UserContext.UnlockAndDisconnectMailboxSession();
                }
            }
            return(result);
        }