Esempio n. 1
0
        /// <summary>
        /// Get content documents from sfdc
        /// </summary>
        internal async Task <IList <Model.Models.ContentDocument> > GetFromSoql(SyncManager syncManager)
        {
            var results = new List <Model.Models.ContentDocument>();
            var target  = new SoqlSyncDownTarget(SoqlQuery);

            var page = await target.StartFetch(syncManager, -1);

            while (page != null && page.Count > 0)
            {
                results.AddRange(page.Select(x => x.ToObject <Model.Models.ContentDocument>()).ToList());
                page = await target.ContinueFetch(syncManager);
            }
            return(results);
        }
Esempio n. 2
0
        internal async Task <IList <Model.Models.MobileAppConfig> > GetFromSoql(SyncManager syncManager)
        {
            List <Model.Models.MobileAppConfig> results = new List <Model.Models.MobileAppConfig>();
            var target = new SoqlSyncDownTarget(SoqlQuery);

            // Sync to JSON
            var _results = await target.StartFetch(syncManager, -1);

            while (_results != null && _results.Count > 0)
            {
                results.AddRange(_results.Select(x => x.ToObject <Model.Models.MobileAppConfig>()).ToList());
                _results = await target.ContinueFetch(syncManager);
            }
            return(results);
        }