public string GetActivities(Array emailAddresses, DateTime startTime) { ActivityFeed af = null; try { af = m_provider.GetActivities((string[])emailAddresses, startTime, true, m_provider.ProviderData.SchemaVersion == ProviderSchemaVersion.v1_1); } 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); } if (af == null || af.Activities == null || af.Activities.Count == 0) { throw new OSCException(@"No changes", OSCExceptions.OSC_E_NO_CHANGES); } af.SchemaVersion = m_provider.ProviderData.SchemaVersion; return(af.Xml); }
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); }