You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#760 Use async delegates for stream factory parameters in UploadAsync() and DownloadAsync()
Previously callers could supply a streamFactory delegate to UploadAsync() and DownloadAsync(), which would be used to defer opening of streams until just before sending or receiving transfer data. The use case is the same, but now the factory method is async, and the factory method call is awaited. This is beneficial for cases where network I/O is used, and eliminates the need for blocking waits if async code was used with the sync factory.
Any code broken by this can be fixed by wrapping the existing return value in Task.FromResult(<the old value>).
#765 Pass the requested start offset for uploads to the input stream factory function
In some cases, the source of input streams will need to do some extra manipulation to prepare the input stream and position the data correctly to support resume-able transfers. In these cases the code supplying the stream to the input stream factory needs to know the desired offset, and it is now passed to the factory function..
The signature of the input stream factory has changed from Func<Task<Stream>> to Func<long, Task<Stream>> to allow the offset to be passed.
Code broken by this change can be fixed by accounting for the long parameter passed to this factory function; it can be discarded.
#768 Deprecate all code that attempts to treat the 'free upload slot' property of search results as an integer instead of a boolean
The property FreeUploadSlots has been removed from SearchResponse, and MinimumPeerFreeUploadSlots has been removed from SearchOptions.
Instead of FreeUploadSlots, HasFreeUploadSlot should be used.
Any code using MinimumPeerFreeUploadSlots should be deleted; there is no replacement property, but code can implement the ResponseFilter delegate using something like (response) => response.HasFreeUploadSlot.
#770 Rename the responseReceived parameter of SearchAsync to responseHandler
This is a naming-only change to make this more consistent with the rest of the API, and to disambiguate the functionality from the ResponseReceived property of SearchOptions.
Any code broken by this can simply rename the existing responseReceived reference to responseHandler.
The text was updated successfully, but these errors were encountered:
Breaking Changes
#760 Use async delegates for stream factory parameters in UploadAsync() and DownloadAsync()
Previously callers could supply a
streamFactory
delegate toUploadAsync()
andDownloadAsync()
, which would be used to defer opening of streams until just before sending or receiving transfer data. The use case is the same, but now the factory method is async, and the factory method call isawait
ed. This is beneficial for cases where network I/O is used, and eliminates the need for blocking waits if async code was used with the sync factory.Any code broken by this can be fixed by wrapping the existing return value in
Task.FromResult(<the old value>)
.#765 Pass the requested start offset for uploads to the input stream factory function
In some cases, the source of input streams will need to do some extra manipulation to prepare the input stream and position the data correctly to support resume-able transfers. In these cases the code supplying the stream to the input stream factory needs to know the desired offset, and it is now passed to the factory function..
The signature of the input stream factory has changed from
Func<Task<Stream>>
toFunc<long, Task<Stream>>
to allow the offset to be passed.Code broken by this change can be fixed by accounting for the long parameter passed to this factory function; it can be discarded.
#768 Deprecate all code that attempts to treat the 'free upload slot' property of search results as an integer instead of a boolean
The property
FreeUploadSlots
has been removed fromSearchResponse
, andMinimumPeerFreeUploadSlots
has been removed fromSearchOptions
.Instead of
FreeUploadSlots
,HasFreeUploadSlot
should be used.Any code using
MinimumPeerFreeUploadSlots
should be deleted; there is no replacement property, but code can implement theResponseFilter
delegate using something like(response) => response.HasFreeUploadSlot
.#770 Rename the responseReceived parameter of SearchAsync to responseHandler
This is a naming-only change to make this more consistent with the rest of the API, and to disambiguate the functionality from the
ResponseReceived
property ofSearchOptions
.Any code broken by this can simply rename the existing
responseReceived
reference toresponseHandler
.The text was updated successfully, but these errors were encountered: