Nullify IFileTransferStreamHandler

This commit is contained in:
Jordan Dominion
2023-11-24 10:02:08 -05:00
parent 774315d3fd
commit 5441e17880
@@ -5,8 +5,6 @@ using System.Threading.Tasks;
using Tgstation.Server.Api.Models.Response;
#nullable disable
namespace Tgstation.Server.Host.Transfer
{
/// <summary>
@@ -21,7 +19,7 @@ namespace Tgstation.Server.Host.Transfer
/// <param name="stream">The <see cref="Stream"/> with uploaded data.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
/// <returns>A <see cref="ValueTask{TResult}"/> resulting in <see langword="null"/> if the upload completed successfully, <see cref="ErrorMessageResponse"/> otherwise.</returns>
ValueTask<ErrorMessageResponse> SetUploadStream(FileTicketResponse ticketResponse, Stream stream, CancellationToken cancellationToken);
ValueTask<ErrorMessageResponse?> SetUploadStream(FileTicketResponse ticketResponse, Stream stream, CancellationToken cancellationToken);
/// <summary>
/// Gets the the <see cref="Stream"/> for a given <paramref name="ticketResponse"/> associated with a pending download.
@@ -29,6 +27,6 @@ namespace Tgstation.Server.Host.Transfer
/// <param name="ticketResponse">The <see cref="FileTicketResponse"/>.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
/// <returns>A <see cref="ValueTask{TResult}"/> resulting in a <see cref="Tuple{T1, T2}"/> containing either a <see cref="Stream"/> containing the data to download or an <see cref="ErrorMessageResponse"/> to return.</returns>
ValueTask<Tuple<Stream, ErrorMessageResponse>> RetrieveDownloadStream(FileTicketResponse ticketResponse, CancellationToken cancellationToken);
ValueTask<Tuple<Stream?, ErrorMessageResponse?>> RetrieveDownloadStream(FileTicketResponse ticketResponse, CancellationToken cancellationToken);
}
}