CSVMetricsLogger/CSV Metrics Logger/IConvertToCSV.cs

27 lines
903 B
C#
Raw Permalink Normal View History

namespace CSV_Metrics_Logger;
2024-05-05 11:19:54 +00:00
/// <summary>
/// Interface for converting a struct to a CSV record. This interface is used
/// by the source generator to augment the struct with the necessary methods.
/// Hence, you DO NOT need to implement this interface yourself.
/// </summary>
public interface IConvertToCSV
{
2024-05-05 11:19:54 +00:00
/// <summary>
/// Returns the number of columns in the CSV record.
/// </summary>
/// <returns>The number of columns in the CSV record.</returns>
public uint GetCSVColumnCount();
2024-05-05 11:19:54 +00:00
/// <summary>
/// Returns the headers of the CSV record.
/// </summary>
/// <returns>The headers of the CSV record.</returns>
public IList<string> GetCSVHeaders();
2024-05-05 11:19:54 +00:00
/// <summary>
/// Returns the data line of the CSV record.
/// </summary>
/// <returns>The data line of the CSV record.</returns>
public IList<string> ConvertToCSVDataLine();
}