public GdaxRequestBuilder AddPagingOptions <TCursor>(PagingOptions <TCursor> paging, ICursorEncoder <TCursor> encoder) { if (paging == null) { return(this); } this.AddParameterIfNotNull("limit", paging.Limit?.ToString()); this.AddParameterIfNotNull("sortedBy", paging.SortBy); this.AddEnumParameterIfNotNull("sorting", paging.SortOrder); this.AddParameterIfNotNull("before", encoder.Encode(paging.NewerThan)); this.AddParameterIfNotNull("after", encoder.Encode(paging.OlderThan)); return(this); }
public PagedResults(GdaxResponse <IList <T> > response, ICursorEncoder <TCursor> encoder, PagingOptions <TCursor> paging = null) { this.response = response; this.encoder = encoder; this.paging = paging; }