25 lines
790 B
C#
25 lines
790 B
C#
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);
|
|
}
|
|
}
|