Initial setup - gitea
This commit is contained in:
@@ -1,11 +1,65 @@
|
||||
namespace PriorBankParser
|
||||
using System.Globalization;
|
||||
using CsvHelper.Configuration;
|
||||
|
||||
namespace PriorBankParser
|
||||
{
|
||||
public static class Constants
|
||||
internal static class Constants
|
||||
{
|
||||
public static class SectionNames
|
||||
internal static class SourceConfig
|
||||
{
|
||||
internal const string CodePage = "windows-1251";
|
||||
|
||||
internal const string CultureInfoName = "ru-RU";
|
||||
|
||||
internal static CultureInfo SrcCultureInfo { get; } = new CultureInfo(CultureInfoName);
|
||||
|
||||
internal static CsvConfiguration SrcCsvConfiguration { get; } = GetReadConfig();
|
||||
|
||||
internal const string CsvDelimiter = ";";
|
||||
}
|
||||
|
||||
private static CsvConfiguration GetReadConfig()
|
||||
{
|
||||
var config = new CsvConfiguration(SourceConfig.SrcCultureInfo)
|
||||
{
|
||||
Delimiter = SourceConfig.CsvDelimiter,
|
||||
IgnoreBlankLines = true,
|
||||
IgnoreQuotes = true,
|
||||
};
|
||||
|
||||
config.RegisterClassMap<TransactionInfoDtoReadMap>();
|
||||
return config;
|
||||
}
|
||||
|
||||
public static CsvConfiguration GetWriteConfig()
|
||||
{
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
Delimiter = ",",
|
||||
ShouldQuote = (s, context) => true,
|
||||
};
|
||||
|
||||
config.RegisterClassMap<TransactionInfoDtoWriteMap>();
|
||||
return config;
|
||||
}
|
||||
|
||||
internal static class SourceColumns
|
||||
{
|
||||
internal const string TransactionDate = "Дата транзакции";
|
||||
internal const string Operation = "Операция";
|
||||
internal const string Amount = "Сумма";
|
||||
internal const string Currency = "Валюта";
|
||||
internal const string OperationDate = "Дата операции по счету";
|
||||
internal const string Commission = "Комиссия/Money-back";
|
||||
internal const string AccountTurnover = "Обороты по счету";
|
||||
internal const string Category = "Категория операции";
|
||||
}
|
||||
|
||||
internal static class SectionNames
|
||||
{
|
||||
internal const string LockedSectionPrefix = "Заблокированные суммы по ........";
|
||||
internal const string OperationSectionPrefix = "Операции по ........";
|
||||
internal const string CardTotalSectionPrefix = "Всего по контракту";
|
||||
internal const string StatementTotalSectionPrefix = "Всего в данной валюте";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user