Skip to content
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

Breaking changes in 5.0.0 #733

Closed
jpdillingham opened this issue Jul 3, 2022 · 0 comments · Fixed by #737
Closed

Breaking changes in 5.0.0 #733

jpdillingham opened this issue Jul 3, 2022 · 0 comments · Fixed by #737

Comments

@jpdillingham
Copy link
Owner

jpdillingham commented Jul 3, 2022

Breaking Changes

#732 Throw TransferSizeMismatchException if remote size doesn't match local

This PR introduces a new TransferStates enum member, Aborted. This is a terminal state similar to Failed, but indicates that the library decided to abort the transfer instead of trying and failing. Right now this is only used when the remote size of the transfer doesn't match the requested size.

This PR also changes the behavior of TransferRejectedException. Previously these exceptions were "double-wrapped", with the first containing only the rejection reason and the second containing a "Transfer rejected" message. I don't know why this was done this way originally, but I've now simplified this handling to re-throw instead of wrap.

#735 Separate EventArgs from delegates

This PR removes EventArgs subclasses from various Option classes and replaces them with tuples with the same shape. For example:

public Action<BrowseProgressUpdatedEventArgs> ProgressUpdated { get; }

Becomes

public Action<(string Username, long BytesTransferred, long BytesRemaining, double PercentComplete, long Size)> ProgressUpdated { get; }

Impacted classes are BrowseOptions, SearchOptions, and TransferOptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant