using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Duplicati.Library.Interface { /// /// Contains extension methods for the IBackend interfaces /// public static class BackendExtensions { /// /// Tests a backend by invoking the List() method. /// As long as the iteration can either complete or find at least one file without throwing, the test is successful /// /// Backend to test public static void TestList(this IBackend backend) { // If we can iterate successfully, even if it's empty, then the backend test is successful foreach (IFileEntry file in backend.List()) { break; } } } }