public string GetActivities(DateTime startTime) { List <string> emailAddresses = new List <string>(); if (!string.IsNullOrEmpty(m_personData.Email)) { emailAddresses.Add(m_personData.Email); } if (!string.IsNullOrEmpty(m_personData.Email2)) { emailAddresses.Add(m_personData.Email2); } if (!string.IsNullOrEmpty(m_personData.Email3)) { emailAddresses.Add(m_personData.Email3); } Schema.ActivityFeed af = null; try { af = m_provider.GetActivities(emailAddresses.ToArray(), startTime, false, false); } catch (COMException cex) { if (Helpers.IsOSCException(cex)) { throw; } else { throw new OSCException(@"GetActivities call failed.", OSCExceptions.OSC_E_INTERNAL_ERROR, cex); } } catch (ApplicationException ex) { throw new OSCException(@"GetActivities call failed.", OSCExceptions.OSC_E_INTERNAL_ERROR, ex); } af.SchemaVersion = m_provider.ProviderData.SchemaVersion; return(af.Xml); }
public string GetActivitiesOfFriendsAndColleagues(DateTime startTime) { Schema.ActivityFeed af = null; List <string> emailAddressesOfFriends = new List <string>(); EnsureFriends(); foreach (Schema.Person p in m_friends.People) { if (p.Email != null) { emailAddressesOfFriends.Add(p.Email); } } try { af = m_provider.GetActivities(emailAddressesOfFriends.ToArray(), startTime, false, false); } catch (COMException cex) { if (Helpers.IsOSCException(cex)) { throw; } else { throw new OSCException(@"GetActivities call failed.", OSCExceptions.OSC_E_INTERNAL_ERROR, cex); } } catch (ApplicationException ex) { throw new OSCException(@"GetActivities call failed.", OSCExceptions.OSC_E_INTERNAL_ERROR, ex); } af.SchemaVersion = m_provider.ProviderData.SchemaVersion; return(af.Xml); }