Skip to content

Commit

Permalink
Added generic overload for CsvConfiguration.ApplyAttributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshClose committed Oct 11, 2022
1 parent f43d2d1 commit 852f039
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/CsvHelper/Configuration/CsvConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,15 @@ public void Validate()
if (DetectDelimiter && DetectDelimiterValues.Length == 0) throw new ConfigurationException($"At least one value is required for {nameof(DetectDelimiterValues)} when {nameof(DetectDelimiter)} is enabled.");
}

/// <summary>
/// Applies class level attribute to configuration.
/// </summary>
/// <typeparam name="T">Type with attributes.</typeparam>
public CsvConfiguration ApplyAttributes<T>()
{
return ApplyAttributes(typeof(T));
}

/// <summary>
/// Applies class level attribute to configuration.
/// </summary>
Expand Down

0 comments on commit 852f039

Please sign in to comment.