I was getting some null exceptions in my code whilst using QBittorrent.GetPeerPartialDataSync upon further investigation I noticed that the properties of PeerPartialData.cs aren't declared as nullable.
I believe they should be nullable as a server reply might as small as just the rid, for example: {"rid":55}.
This pull request makes all properties in the PeerPartialData class (except for ResponseId) nullable. This should make it clear to anyone utilising it that null values have to be handled where applicable.
This is just a quick edit/submission through the GitHub WebUI but only one file is affected, making things optionally nullable shouldn't lead to anything breaking.
I was getting some null exceptions in my code whilst using
QBittorrent.GetPeerPartialDataSync
upon further investigation I noticed that the properties of PeerPartialData.cs aren't declared as nullable. I believe they should be nullable as a server reply might as small as just the rid, for example:{"rid":55}
.This pull request makes all properties in the PeerPartialData class (except for ResponseId) nullable. This should make it clear to anyone utilising it that null values have to be handled where applicable.
This is just a quick edit/submission through the GitHub WebUI but only one file is affected, making things optionally nullable shouldn't lead to anything breaking.