Export: Refactor interfaces and classes
This commit is contained in:
24
Elwig/Helpers/Export/IExporter.cs
Normal file
24
Elwig/Helpers/Export/IExporter.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Elwig.Helpers.Export {
|
||||
public interface IExporter<T> : IDisposable, IAsyncDisposable {
|
||||
/// <summary>
|
||||
/// The default file extension of the exported files to be used (whithout a preceding ".")
|
||||
/// </summary>
|
||||
static string FileExtension { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Export the given data to the given file.
|
||||
/// </summary>
|
||||
/// <param name="data">The data to be exported</param>
|
||||
void Export(IEnumerable<T> data);
|
||||
|
||||
/// <summary>
|
||||
/// Export the given data to the given file.
|
||||
/// </summary>
|
||||
/// <param name="data">The data to be exported</param>
|
||||
Task ExportAsync(IEnumerable<T> data);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user