public PollResult Poll(bool initial, object checkPoint) { if (m_Incremental) { return(PollResult.CreateIncremental(m_Added, m_Changed, m_Deleted, checkPoint)); } return(PollResult.CreateFull(m_Full)); }
/// <summary> /// Poll the configuration source to get the latest content. /// </summary> /// <param name="initial">true if this operation is the first poll.</param> /// <param name="checkPoint"> /// Object that is used to determine the starting point if the result returned is incremental. /// Null if there is no check point or the caller wishes to get the full content. /// </param> /// <returns>The content of the configuration which may be full or incremental.</returns> public PollResult Poll(bool initial, object checkPoint) { if (m_ConfigUrls == null || m_ConfigUrls.Length == 0) { return(PollResult.CreateFull(null)); } var properties = new Dictionary <string, object>(); foreach (var url in m_ConfigUrls) { var urlProperties = DownloadProperties(url); foreach (var urlProperty in urlProperties) { properties[urlProperty.Key] = urlProperty.Value; } } return(PollResult.CreateFull(properties)); }