-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
893 readonlypagecollection null body #897
893 readonlypagecollection null body #897
Conversation
…sAResponseWithANullBody
@@ -11,7 +11,7 @@ public class ReadOnlyPagedCollection<T> : ReadOnlyCollection<T>, IReadOnlyPagedC | |||
readonly Func<Uri, Task<IApiResponse<List<T>>>> _nextPageFunc; | |||
|
|||
public ReadOnlyPagedCollection(IApiResponse<List<T>> response, Func<Uri, Task<IApiResponse<List<T>>>> nextPageFunc) | |||
: base(response != null ? response.Body : new List<T>()) | |||
: base(response != null ? response.Body ?? new List<T>() : new List<T>()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I really understand the power of the ?.
operator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! 😒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably upgrade our compiler to use C# 6 if someone wants to take a crack at it. As long as we don't break our other platforms.
…l-body 893 readonlypagecollection null body
This is now live on NuGet as of version |
👏 |
fixes #893