From 8d3883df147167234d1f2e4c618502245af8794e Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Mon, 6 Nov 2023 17:59:30 +0100 Subject: [PATCH] Aligned parameters on sync and async methods on IFileSource. (#15128) --- src/Umbraco.Core/Deploy/IFileSource.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Deploy/IFileSource.cs b/src/Umbraco.Core/Deploy/IFileSource.cs index e56f9a715e..d3f6ebe770 100644 --- a/src/Umbraco.Core/Deploy/IFileSource.cs +++ b/src/Umbraco.Core/Deploy/IFileSource.cs @@ -61,19 +61,31 @@ public interface IFileSource /// The length of the file, or -1 if the file does not exist. Task GetFileLengthAsync(StringUdi udi, CancellationToken token); + // TODO (V14): Remove obsolete methods and default implementations for GetFiles and GetFilesAsync overloads. + /// /// Gets files and store them using a file store. /// - /// The udis of the files to get. + /// The UDIs of the files to get. /// A collection of file types which can store the files. + [Obsolete("Please use the method overload taking all parameters. This method overload will be removed in Umbraco 14.")] void GetFiles(IEnumerable udis, IFileTypeCollection fileTypes); - // TODO (V14): Remove obsolete method and default implementation for GetFilesAsync overloads. + /// + /// Gets files and store them using a file store. + /// + /// The UDIs of the files to get. + /// A collection of file types which can store the files. + /// A flag indicating whether to continue if a file isn't found or to stop and throw a FileNotFoundException. + void GetFiles(IEnumerable udis, bool continueOnFileNotFound, IFileTypeCollection fileTypes) +#pragma warning disable CS0618 // Type or member is obsolete + => GetFiles(udis, fileTypes); +#pragma warning restore CS0618 // Type or member is obsolete /// /// Gets files and store them using a file store. /// - /// The udis of the files to get. + /// The UDIs of the files to get. /// A collection of file types which can store the files. /// A cancellation token. [Obsolete("Please use the method overload taking all parameters. This method overload will be removed in Umbraco 14.")] @@ -82,10 +94,12 @@ public interface IFileSource /// /// Gets files and store them using a file store. /// - /// The udis of the files to get. + /// The UDIs of the files to get. /// A collection of file types which can store the files. /// A flag indicating whether to continue if a file isn't found or to stop and throw a FileNotFoundException. /// A cancellation token. Task GetFilesAsync(IEnumerable udis, IFileTypeCollection fileTypes, bool continueOnFileNotFound, CancellationToken token) +#pragma warning disable CS0618 // Type or member is obsolete => GetFilesAsync(udis, fileTypes, token); +#pragma warning restore CS0618 // Type or member is obsolete }