public IEnumerable <T> GetEnumerator() { FetchingFrom = FetchingOrigin.Resend; foreach (var item in FetchFromResend()) { yield return(item); } if (DocSent) { // we don't mix resend and regular, so we need to do another round when we are done with the resend SubscriptionConnectionsState.NotifyHasMoreDocs(); yield break; } FetchingFrom = FetchingOrigin.Storage; foreach (var item in FetchByEtag()) { yield return(item); } }
protected SubscriptionFetcher(DocumentDatabase database, SubscriptionConnectionsState subscriptionConnectionsState, string collection) : base(database, subscriptionConnectionsState, collection) { Logger = LoggingSource.Instance.GetLogger <SubscriptionFetcher <T> >(Database.Name); }