From f41badad5074668ac36f07a58bbf971e01678ce6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 7 Jan 2024 18:40:56 -0600 Subject: make list params more explicit --- src/slskd/Transfers/Uploads/UploadService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/slskd/Transfers/Uploads/UploadService.cs b/src/slskd/Transfers/Uploads/UploadService.cs index 04e6a431..56bf3751 100644 --- a/src/slskd/Transfers/Uploads/UploadService.cs +++ b/src/slskd/Transfers/Uploads/UploadService.cs @@ -75,9 +75,9 @@ namespace slskd.Transfers.Uploads /// Returns a list of all uploads matching the optional . /// /// An optional expression used to match uploads. - /// Optionally include uploads that have been removed previously. + /// A value indicating whether to include uploads that have been removed previously. /// The list of uploads matching the specified expression, or all uploads if no expression is specified. - List List(Expression> expression = null, bool includeRemoved = false); + List List(Expression> expression, bool includeRemoved); /// /// Removes uploads older than the specified . @@ -233,7 +233,7 @@ namespace slskd.Transfers.Uploads Log.Information("Resolved {Remote} to physical file {Physical} on host '{Host}'", filename, localFilename, host); // find existing records for this username and file that haven't been removed from the UI - var existingRecords = List(t => t.Username == username && t.Filename == localFilename && !t.Removed); + var existingRecords = List(t => t.Username == username && t.Filename == localFilename, includeRemoved: false); // check whether any of these records is in a non-complete state and bail out if so if (existingRecords.Any(t => !t.State.HasFlag(TransferStates.Completed))) @@ -428,9 +428,9 @@ namespace slskd.Transfers.Uploads /// Returns a list of all uploads matching the optional . /// /// An optional expression used to match uploads. - /// Optionally include uploads that have been removed previously. + /// A value indicating whether to include uploads that have been removed previously. /// The list of uploads matching the specified expression, or all uploads if no expression is specified. - public List List(Expression> expression = null, bool includeRemoved = false) + public List List(Expression> expression, bool includeRemoved) { expression ??= t => true; -- cgit v1.2.3