Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshClose committed Jan 25, 2024
1 parent 8744765 commit 764c090
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CsvHelper/Configuration/CsvConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public record CsvConfiguration : IReaderConfiguration, IWriterConfiguration
public virtual bool CountBytes { get; set; }

/// <inheritdoc/>
public virtual CultureInfo CultureInfo { get; internal set; }
public virtual CultureInfo CultureInfo { get; protected internal set; }

/// <inheritdoc/>
public virtual string Delimiter { get; set; }
Expand All @@ -51,7 +51,7 @@ public record CsvConfiguration : IReaderConfiguration, IWriterConfiguration
public virtual GetDelimiter GetDelimiter { get; set; } = ConfigurationFunctions.GetDelimiter;

/// <inheritdoc/>
public virtual string[] DetectDelimiterValues { get; set; } = new[] { ",", ";", "|", "\t" };
public virtual string[] DetectDelimiterValues { get; set; } = [",", ";", "|", "\t"];

/// <inheritdoc/>
public virtual bool DetectColumnCountChanges { get; set; }
Expand Down Expand Up @@ -90,7 +90,7 @@ public record CsvConfiguration : IReaderConfiguration, IWriterConfiguration
public virtual bool IncludePrivateMembers { get; set; }

/// <inheritdoc/>
public virtual char[] InjectionCharacters { get; set; } = new[] { '=', '@', '+', '-', '\t', '\r' };
public virtual char[] InjectionCharacters { get; set; } = ['=', '@', '+', '-', '\t', '\r'];

/// <inheritdoc/>
public virtual char InjectionEscapeCharacter { get; set; } = '\'';
Expand Down Expand Up @@ -158,7 +158,7 @@ public virtual string NewLine
public virtual bool UseNewObjectForNullReferenceMembers { get; set; } = true;

/// <inheritdoc/>
public virtual char[] WhiteSpaceChars { get; set; } = new char[] { ' ' };
public virtual char[] WhiteSpaceChars { get; set; } = [' '];

/// <summary>
/// Initializes a new instance of the <see cref="CsvConfiguration"/> class
Expand Down Expand Up @@ -303,7 +303,7 @@ public static CsvConfiguration FromType(Type type)
var cultureInfoAttribute = (CultureInfoAttribute)Attribute.GetCustomAttribute(type, typeof(CultureInfoAttribute));
if (cultureInfoAttribute == null)
{
throw new ConfigurationException($"A CultureInfoAttribute is required on type '{type.Name}' to use this method.");
throw new ConfigurationException($"A {nameof(CultureInfoAttribute)} is required on type '{type.Name}' to use this method.");
}

var config = new CsvConfiguration(CultureInfo.InvariantCulture);
Expand Down

0 comments on commit 764c090

Please sign in to comment.