Esempio n. 1
0
        public static Native.Query ToNative(this QueryFilter filter)
        {
            var query = new Native.Query();

            if (filter != null)
            {
                if (filter.Ids?.Any() ?? false)
                {
                    var ids = filter.Ids.Select(long.Parse).ToArray();
                    query.SetFilterById(ids);
                }
                //switch (filter.States)
                //{
                //    case HttpTransferStateFilter.Both:
                //        query.SetFilterByStatus(DownloadStatus.Pending | DownloadStatus.Running);
                //        break;

                //    case HttpTransferStateFilter.Pending:
                //        query.SetFilterByStatus(DownloadStatus.Pending);
                //        break;

                //    case HttpTransferStateFilter.InProgress:
                //        query.SetFilterByStatus(DownloadStatus.Running);
                //        break;
                //}
            }
            return(query);
        }
Esempio n. 2
0
        public async Task <IEnumerable <IHttpTransfer> > GetTransfers()
        {
            var transfers = await this.repository.GetAll <HttpTransferStore>();

            var query = new Native.Query();

            throw new NotImplementedException();
        }