Files
zszq-trs/Framework/YLErp.Core/DotNetDBF/DBFBase.cs
T
2024-05-09 14:06:26 +08:00

52 lines
1.2 KiB
C#

/*
Serves as the base class of DBFReader adn DBFWriter.
This file is part of DotNetDBF packege.
original author (javadbf): anil@linuxense.com 2004/03/31
license: LGPL (http://www.gnu.org/copyleft/lesser.html)
Support for choosing implemented character Sets as
suggested by Nick Voznesensky <darkers@mail.ru>
ported to C# (DotNetDBF): Jay Tuley <jay+dotnetdbf@tuley.name> 6/28/2007
*/
using System.Text;
namespace DotNetDBF
{
/// <summary>
///
/// </summary>
public abstract class DBFBase
{
/// <summary>
///
/// </summary>
public Encoding CharEncoding { get; set; } = Encoding.GetEncoding("utf-8");
/// <summary>
///
/// </summary>
public int BlockSize { get; set; } = 512;
private string _nullSymbol;
/// <summary>
///
/// </summary>
public string NullSymbol
{
get => _nullSymbol ?? DBFFieldType.Unknown;
set
{
if (value != null && value.Length != 1)
throw new ArgumentException(nameof(NullSymbol));
_nullSymbol = value;
}
}
}
}