예제 #1
0
 ///<summary>Returns distinct list of email strings to be recommended to user.
 ///Splits all email address fields into a large list of individual addresses into one large distinct list.
 ///When given list is null, will run query.</summary>
 private void SetHistoricContacts(List <EmailMessage> listEmailMessages)
 {
     if (listEmailMessages == null)
     {
         _listHistoricContacts = EmailMessages.GetHistoricalEmailAddresses(EmailAddressPreview);
         return;
     }
     _listHistoricContacts = EmailMessages.GetAddressesFromMessages(listEmailMessages);
 }
예제 #2
0
		///<summary>Returns distinct list of email strings to be recommended to user.
		///Splits all email address fields into a large list of individual addresses into one large distinct list.
		///When given list is null, will run query.</summary>
		private void SetHistoricContacts(List<EmailMessage> listEmailMessages) {
			if(EmailAddressPreview==null) {
				//Only null when failed to match from address. If we do not know the from address then we can't load anything useful.
				return;
			}
			EmailAddress emailAddressPreview=EmailAddressPreview.Clone();
			ODThread thread=new ODThread(o => {
				List<string> listHistoricContacts;
				if(listEmailMessages==null) {
					listHistoricContacts=EmailMessages.GetHistoricalEmailAddresses(emailAddressPreview);
				}
				else {
					listHistoricContacts=EmailMessages.GetAddressesFromMessages(listEmailMessages);
				}
				this.InvokeIfRequired(() => {
					_listHistoricContacts=listHistoricContacts;
					_hasSetHistoricContacts=true;
				});
			});
			thread.Name="SetHistoricContacts";
			thread.Start();
		}