Пример #1
0
 public IEnumerable <T> ExecuteCursorGETQuery <T, T1>(
     string baseQuery,
     ICursorQueryParameters cursorQueryParameters)
     where T1 : class, IBaseCursorQueryDTO <T>
 {
     return(ExecuteCursorGETQuery <T, T1>(baseQuery, cursorQueryParameters.MaximumNumberOfResults,
                                          cursorQueryParameters.Cursor));
 }
Пример #2
0
        public CursorQueryParameters(ICursorQueryParameters parameters) : base(parameters)
        {
            if (parameters == null)
            {
                return;
            }

            Cursor   = parameters.Cursor;
            PageSize = parameters.PageSize;
        }
Пример #3
0
        public ITwitterPageIterator <ITwitterResult <T> > Create <T>(ICursorQueryParameters parameters, Func <string, Task <ITwitterResult <T> > > getNext) where T : IBaseCursorQueryDTO
        {
            var twitterCursorResult = new TwitterPageIterator <ITwitterResult <T> >(
                parameters.Cursor,
                getNext,
                page => page.DataTransferObject.NextCursorStr,
                page => page.DataTransferObject.NextCursorStr == "0");

            return(twitterCursorResult);
        }
Пример #4
0
 public void AppendCursorParameters(StringBuilder query, ICursorQueryParameters parameters)
 {
     query.AddParameterToQuery("cursor", parameters.Cursor);
     query.AddParameterToQuery("count", parameters.PageSize);
 }