Upgrade (UniDataStorageWriter): improve writer configuration UX and CSV handling

- added technology-specific default configuration for new writers
- auto-fill default SQL/XLSX write templates
- disabled write templates for CSV technology
- added technology-specific data source hints
- changed test parameter format to Column=Value and Where=Value;Set=Value
- improved parameter validation to prevent invalid input crashes
- added automatic CSV header creation and header validation
- aligned CSV writer behaviour with XLSX writer
- Increase revision number
This commit is contained in:
Marek Frniak 2026-07-21 11:13:43 +02:00
parent 4cd191fcb2
commit a210a0d1f2
20 changed files with 1831 additions and 84 deletions

View File

@ -7,6 +7,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -7,6 +7,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -9,6 +9,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -9,6 +9,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -21,6 +21,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<oracle.manageddataaccess.client>

View File

@ -9,6 +9,26 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.9.3134.106")]
[assembly: AssemblyFileVersion("3.9.3134.106")]
[assembly: AssemblyVersion("3.9.3134.107")]
[assembly: AssemblyFileVersion("3.9.3134.107")]

View File

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Diagnostic;
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Diagnostic;
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Interfaces;
namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter

View File

@ -31,6 +31,7 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter
public const string Csv = ".csv";
public const string Xls = ".xls";
public const string Xlsx = ".xlsx";
public const string Json = ".json";
}
}

View File

@ -7,6 +7,7 @@
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Interfaces;
using TBF.Rig.Output.DataStorage.UniDataStorageWriter.Writers;
using static TBF.Rig.Output.DataStorage.UniDataStorageWriter.Types;
using System.Runtime.InteropServices;
namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
{
@ -25,6 +26,32 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
private WriterCfg config;
private bool isUnlocked;
private const string CsvTemplateHint =
"Write template is not used.";
private const string DefaultDatabaseInsertTemplate =
"Insert|INSERT INTO dbo.table ({0}) VALUES ({1})";
private const string DefaultDatabaseUpdateTemplate =
"Update|UPDATE dbo.table SET {2} = {3} WHERE {0} = {1}";
private const string DefaultXlsxInsertTemplate =
"Insert|INSERT INTO Sheet1 ({0}) VALUES ({1})";
private const string DefaultXlsxUpdateTemplate =
"Update|UPDATE Sheet1 SET {2} = {3} WHERE {0} = {1}";
private const int EmSetCueBanner = 0x1501;
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
private static extern IntPtr SendMessage(
IntPtr hWnd,
int msg,
IntPtr wParam,
string lParam);
public bool ShowMore
{
get { return false; }
@ -55,6 +82,8 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
buttonUpdateTemplate.Click += buttonUpdateTemplate_Click;
buttonRemoveTemplate.Click += buttonRemoveTemplate_Click;
writeTemplatesListBox.SelectedIndexChanged += writeTemplatesListBox_SelectedIndexChanged;
technologyTypeComboBox.SelectedIndexChanged += technologyTypeComboBox_SelectedIndexChanged;
}
private void WriterCfgCtrl_Load(object sender, EventArgs e)
@ -70,6 +99,8 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
if (config != null)
Redraw();
ApplyTechnologyConfiguration(true);
}
public void Closing()
@ -118,29 +149,136 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
RefreshTemplatesListBox();
UpdateInputHint();
RefreshWriteParamsListBox();
ApplyTechnologyConfiguration(true);
}
public void Unlock()
{
isUnlocked = true;
nameTextBox.Enabled = true;
dataStorageTypeComboBox.Enabled = true;
dataSourceTextBox.Enabled = true;
sourceTestResultTextBox.Enabled = true;
sourceTestResultTextBox.ReadOnly = true;
writeTestResultTextBox.Enabled = true;
writeTestResultTextBox.ReadOnly = true;
writeParamValueTextBox.Enabled = true;
listBoxWriteParams.Enabled = true;
buttonAddParam.Enabled = true;
buttonRemoveParam.Enabled = true;
writeModeComboBox.Enabled = true;
technologyTypeComboBox.Enabled = true;
writeTemplatesListBox.Enabled = true;
templateEditTextBox.Enabled = true;
buttonAddTemplate.Enabled = true;
buttonUpdateTemplate.Enabled = true;
buttonRemoveTemplate.Enabled = true;
examples1Button.Enabled = true;
ApplyTechnologyConfiguration(false);
}
/// <summary>
/// Updates source hints, default templates and template control availability
/// according to the selected technology.
/// </summary>
/// <param name="initializeDefaults">
/// <see langword="true"/> to create default templates when the template list
/// is empty; otherwise, <see langword="false"/>.
/// </param>
private void ApplyTechnologyConfiguration(bool initializeDefaults)
{
string technologyType =
(technologyTypeComboBox.Text ?? string.Empty).Trim();
SetDataSourceHint(GetDataSourceHint(technologyType));
bool templatesSupported =
technologyType == TechnologyTypes.MicrosoftSql ||
technologyType == TechnologyTypes.Xlsx ||
technologyType == TechnologyTypes.Xls;
if (technologyType == TechnologyTypes.Csv)
{
writeTemplatesListBox.Items.Clear();
templateEditTextBox.Text = CsvTemplateHint;
SetTemplateControlsEnabled(false);
return;
}
if (initializeDefaults &&
templatesSupported &&
writeTemplatesListBox.Items.Count == 0)
{
AddDefaultTemplates(technologyType);
}
if (!templatesSupported)
{
writeTemplatesListBox.Items.Clear();
templateEditTextBox.Clear();
}
else if (templateEditTextBox.Text == CsvTemplateHint)
{
templateEditTextBox.Clear();
}
SetTemplateControlsEnabled(
templatesSupported && isUnlocked);
}
/// <summary>
/// Adds default write templates for the selected technology.
/// </summary>
/// <param name="technologyType">
/// Selected writer technology type.
/// </param>
private void AddDefaultTemplates(string technologyType)
{
writeTemplatesListBox.Items.Clear();
switch (technologyType)
{
case TechnologyTypes.MicrosoftSql:
writeTemplatesListBox.Items.Add(
DefaultDatabaseInsertTemplate);
writeTemplatesListBox.Items.Add(
DefaultDatabaseUpdateTemplate);
break;
case TechnologyTypes.Xlsx:
case TechnologyTypes.Xls:
writeTemplatesListBox.Items.Add(
DefaultXlsxInsertTemplate);
writeTemplatesListBox.Items.Add(
DefaultXlsxUpdateTemplate);
break;
}
if (writeTemplatesListBox.Items.Count > 0)
writeTemplatesListBox.SelectedIndex = 0;
}
/// <summary>
/// Enables or disables controls used for write template configuration.
/// </summary>
/// <param name="enabled">
/// <see langword="true"/> to enable template editing; otherwise,
/// <see langword="false"/>.
/// </param>
private void SetTemplateControlsEnabled(bool enabled)
{
writeTemplatesListBox.Enabled = enabled;
templateEditTextBox.Enabled = enabled;
buttonAddTemplate.Enabled = enabled;
buttonUpdateTemplate.Enabled = enabled;
buttonRemoveTemplate.Enabled = enabled;
examples1Button.Enabled = enabled;
}
public CfgUpdateFlags VerifyCfg(ref string message)
@ -214,14 +352,9 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
tmpCfg.TechnologyType = (technologyTypeComboBox.Text ?? string.Empty).Trim();
tmpCfg.DataSource = dataSourceTextBox.Text;
if (config != null && config.WriteTemplates != null)
{
tmpCfg.WriteTemplates = new List<string>(config.WriteTemplates);
}
else
{
tmpCfg.WriteTemplates = new List<string>();
}
tmpCfg.WriteTemplates = writeTemplatesListBox.Items
.Cast<string>()
.ToList();
string selectedTemplate = tmpCfg.GetTemplate(mode);
tmpCfg.QueryTemplate = selectedTemplate;
@ -267,6 +400,9 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
case TechnologyTypes.Csv:
return new CsvWriter(cfg);
case TechnologyTypes.Xlsx:
return new XlsxWriter(cfg);
case TechnologyTypes.Json:
throw new NotSupportedException("JSON writer is not supported yet.");
@ -362,18 +498,39 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
return request;
}
/// <summary>
/// Parses an insert parameter in the format <c>Column=Value</c>.
/// </summary>
/// <param name="text">
/// Text containing the column name and value.
/// </param>
/// <returns>
/// Parsed insert write item.
/// </returns>
/// <exception cref="InvalidOperationException">
/// Thrown when the input format is invalid.
/// </exception>
private InsertWriteItem ParseInsertItem(string text)
{
if (string.IsNullOrWhiteSpace(text))
throw new InvalidOperationException("Insert item is empty.");
string[] parts = text
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
.Split(new[] { '=' }, 2, StringSplitOptions.None)
.Select(p => p.Trim())
.ToArray();
if (parts.Length != 2)
throw new InvalidOperationException("Insert format must be: Column;Value");
throw new InvalidOperationException(
"Insert format must be: Column=Value");
if (string.IsNullOrWhiteSpace(parts[0]))
throw new InvalidOperationException(
"Insert column name cannot be empty.");
if (string.IsNullOrWhiteSpace(parts[1]))
throw new InvalidOperationException(
"Insert value cannot be empty.");
return new InsertWriteItem
{
@ -382,25 +539,75 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
};
}
/// <summary>
/// Parses an update parameter in the format
/// <c>WhereName=WhereValue;SetName=SetValue</c>.
/// </summary>
/// <param name="text">
/// Text containing the update condition and target value.
/// </param>
/// <returns>
/// Parsed update write item.
/// </returns>
/// <exception cref="InvalidOperationException">
/// Thrown when the input format is invalid.
/// </exception>
private UpdateWriteItem ParseUpdateItem(string text)
{
if (string.IsNullOrWhiteSpace(text))
throw new InvalidOperationException("Update item is empty.");
string[] parts = text
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)
string[] pairs = text
.Split(new[] { ';' }, StringSplitOptions.None)
.Select(p => p.Trim())
.ToArray();
if (parts.Length != 4)
throw new InvalidOperationException("Update format must be: WhereName;WhereValue;SetName;SetValue");
if (pairs.Length != 2)
{
throw new InvalidOperationException(
"Update format must be: " +
"WhereName=WhereValue;SetName=SetValue");
}
string[] whereParts = pairs[0]
.Split(new[] { '=' }, 2, StringSplitOptions.None)
.Select(p => p.Trim())
.ToArray();
string[] setParts = pairs[1]
.Split(new[] { '=' }, 2, StringSplitOptions.None)
.Select(p => p.Trim())
.ToArray();
if (whereParts.Length != 2 || setParts.Length != 2)
{
throw new InvalidOperationException(
"Update format must be: " +
"WhereName=WhereValue;SetName=SetValue");
}
if (string.IsNullOrWhiteSpace(whereParts[0]))
throw new InvalidOperationException(
"WHERE column name cannot be empty.");
if (string.IsNullOrWhiteSpace(whereParts[1]))
throw new InvalidOperationException(
"WHERE value cannot be empty.");
if (string.IsNullOrWhiteSpace(setParts[0]))
throw new InvalidOperationException(
"SET column name cannot be empty.");
if (string.IsNullOrWhiteSpace(setParts[1]))
throw new InvalidOperationException(
"SET value cannot be empty.");
return new UpdateWriteItem
{
WhereParameterName = parts[0],
WhereValue = parts[1],
SetParameterName = parts[2],
SetValue = parts[3]
WhereParameterName = whereParts[0],
WhereValue = whereParts[1],
SetParameterName = setParts[0],
SetValue = setParts[1]
};
}
@ -413,7 +620,10 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
if (string.IsNullOrWhiteSpace(text))
return;
try
{
WriteMode mode;
if (!Enum.TryParse(writeModeComboBox.Text, true, out mode))
mode = WriteMode.Insert;
@ -423,9 +633,21 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
ParseUpdateItem(text);
batchWriteLines.Add(text);
writeParamValueTextBox.Clear();
RefreshWriteParamsListBox();
}
catch (InvalidOperationException ex)
{
writeTestResultTextBox.Text =
"Invalid write parameter:" +
Environment.NewLine +
ex.Message;
writeParamValueTextBox.Focus();
writeParamValueTextBox.SelectAll();
}
}
private void buttonRemoveParam_Click(object sender, EventArgs e)
{
@ -452,13 +674,16 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
{
if (writeModeComboBox.Text == WriteMode.Insert.ToString())
{
labelParamValue.Text = "Insert: Column;Value";
writeParamValueTextBox.Text = "Column;Value";
labelParamValue.Text = "Insert: Column=Value";
writeParamValueTextBox.Text = "Column=Value";
}
else
{
labelParamValue.Text = "Update: WhereName;WhereValue;SetName;SetValue";
writeParamValueTextBox.Text = "WhereName;WhereValue;SetName;SetValue";
labelParamValue.Text =
"Update: WhereName=WhereValue;SetName=SetValue";
writeParamValueTextBox.Text =
"WhereName=WhereValue;SetName=SetValue";
}
}
@ -539,37 +764,64 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
private void UpdateTechnologyTypeUi()
{
string storageType = (dataStorageTypeComboBox.Text ?? string.Empty).Trim();
string previousTechnology =
(technologyTypeComboBox.Text ?? string.Empty).Trim();
string storageType =
(dataStorageTypeComboBox.Text ?? string.Empty).Trim();
technologyTypeComboBox.Items.Clear();
technologyTypeComboBox.Text = string.Empty;
switch (storageType)
{
case StorageTypes.LocalDatabase:
case StorageTypes.RemoteDatabase:
technologyTypeLabel.Text = "Database type:";
technologyTypeComboBox.Items.Add(TechnologyTypes.MicrosoftSql);
technologyTypeComboBox.Items.Add(TechnologyTypes.MySqlMariaDb);
technologyTypeComboBox.Items.Add(TechnologyTypes.SQLite);
technologyTypeComboBox.Items.Add(
TechnologyTypes.MicrosoftSql);
technologyTypeComboBox.Items.Add(
TechnologyTypes.MySqlMariaDb);
technologyTypeComboBox.Items.Add(
TechnologyTypes.SQLite);
break;
case StorageTypes.LocalFile:
case StorageTypes.RemoteFile:
technologyTypeLabel.Text = "File type:";
technologyTypeComboBox.Items.Add(TechnologyTypes.Csv);
technologyTypeComboBox.Items.Add(TechnologyTypes.Xls);
technologyTypeComboBox.Items.Add(TechnologyTypes.Json);
break;
case StorageTypes.RestApi:
technologyTypeLabel.Text = "Technology type:";
technologyTypeComboBox.Items.Add(
TechnologyTypes.Csv);
technologyTypeComboBox.Items.Add(
TechnologyTypes.Xlsx);
technologyTypeComboBox.Items.Add(
TechnologyTypes.Xls);
technologyTypeComboBox.Items.Add(
TechnologyTypes.Json);
break;
default:
technologyTypeLabel.Text = "Technology type:";
break;
}
if (!string.IsNullOrWhiteSpace(previousTechnology) &&
technologyTypeComboBox.Items.Contains(previousTechnology))
{
technologyTypeComboBox.SelectedItem =
previousTechnology;
}
else if (technologyTypeComboBox.Items.Count > 0)
{
technologyTypeComboBox.SelectedIndex = 0;
}
ApplyTechnologyConfiguration(true);
}
private void writeModeComboBox_SelectedIndexChanged(object sender, EventArgs e)
@ -599,6 +851,11 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
templateEditTextBox.Text = writeTemplatesListBox.SelectedItem.ToString();
}
private void technologyTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
ApplyTechnologyConfiguration(true);
}
private void buttonAddTemplate_Click(object sender, EventArgs e)
{
string text = (templateEditTextBox.Text ?? string.Empty).Trim();
@ -652,5 +909,55 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
writeTemplatesListBox.SelectedIndex = newIndex;
}
}
/// <summary>
/// Returns the data source hint for the selected technology.
/// </summary>
/// <param name="technologyType">
/// Selected technology type.
/// </param>
/// <returns>
/// Data source input hint.
/// </returns>
private string GetDataSourceHint(string technologyType)
{
switch (technologyType)
{
case TechnologyTypes.Csv:
return "Insert the .csv file path";
case TechnologyTypes.Xlsx:
return "Insert the .xlsx file path";
case TechnologyTypes.Xls:
return "Insert the .xls file path";
case TechnologyTypes.MicrosoftSql:
case TechnologyTypes.MySqlMariaDb:
case TechnologyTypes.SQLite:
return "Insert database connection string";
default:
return "Insert data storage source";
}
}
/// <summary>
/// Sets the placeholder text displayed by the data source textbox.
/// </summary>
/// <param name="hint">
/// Placeholder text.
/// </param>
private void SetDataSourceHint(string hint)
{
if (!dataSourceTextBox.IsHandleCreated)
return;
SendMessage(
dataSourceTextBox.Handle,
EmSetCueBanner,
new IntPtr(1),
hint ?? string.Empty);
}
}
}

View File

@ -202,7 +202,6 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
this.writeDataByParamAndTemplateButton.TabIndex = 17;
this.writeDataByParamAndTemplateButton.Text = "Write data by param and template";
this.writeDataByParamAndTemplateButton.UseVisualStyleBackColor = true;
this.writeDataByParamAndTemplateButton.Click += new System.EventHandler(this.writeDataByParamAndTemplateButton_Click);
//
// groupBox3
//

View File

@ -105,6 +105,12 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter
case TechnologyTypes.Csv:
return new CsvWriter(cfg);
case TechnologyTypes.Xlsx:
return new XlsxWriter(cfg);
case TechnologyTypes.Xls:
return new XlsxWriter(cfg);
case TechnologyTypes.Json:
return new JsonWriter(cfg);

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@ -99,30 +100,160 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.Writers
}
/// <summary>
/// Insert mode:
/// request.InsertItems define a single CSV row.
/// Example:
/// SerialNumber=SN001
/// Result=PASS
/// Produces:
/// SN001;PASS
///
/// Current implementation writes only values, not header names.
/// Appends one data row to the CSV file.
/// </summary>
/// <param name="request">
/// Request containing the insert items.
/// </param>
/// <returns>
/// A diagnostic result describing the inserted row.
/// </returns>
/// <remarks>
/// <para>
/// When the CSV file is empty or contains only empty lines, the first row is
/// automatically created from the insert item column names.
/// </para>
/// <para>
/// When the CSV file already contains a header, values are ordered according
/// to the existing header.
/// </para>
/// </remarks>
private WriterDiagnosticResult ExecuteInsert(DataWriteRequest request)
{
if (request.InsertItems == null || request.InsertItems.Count == 0)
if (request.InsertItems == null ||
request.InsertItems.Count == 0)
{
return Fail("No insert items provided.");
}
string delimiter = ";";
if (request.InsertItems.Any(i => i == null))
return Fail("Insert items contain a null item.");
string[] values = request.InsertItems
.Select(i => EscapeCsvValue(i != null ? i.Value : null))
if (request.InsertItems.Any(
i => string.IsNullOrWhiteSpace(i.ColumnName)))
{
return Fail("Insert item contains an empty column name.");
}
string[] duplicateColumns = request.InsertItems
.GroupBy(
i => i.ColumnName,
StringComparer.OrdinalIgnoreCase)
.Where(g => g.Count() > 1)
.Select(g => g.Key)
.ToArray();
if (duplicateColumns.Length > 0)
{
return Fail(
"Insert items contain duplicate columns: " +
string.Join(", ", duplicateColumns));
}
const string delimiter = ";";
Dictionary<string, string> valuesByColumn =
request.InsertItems.ToDictionary(
item => item.ColumnName,
item => item.Value,
StringComparer.OrdinalIgnoreCase);
string firstNonEmptyLine = null;
if (File.Exists(cfg.DataSource))
{
firstNonEmptyLine = File
.ReadLines(cfg.DataSource, Encoding.UTF8)
.FirstOrDefault(line => !string.IsNullOrWhiteSpace(line));
}
string[] headerColumns;
if (string.IsNullOrWhiteSpace(firstNonEmptyLine))
{
headerColumns = request.InsertItems
.Select(item => item.ColumnName)
.ToArray();
string headerLine = string.Join(
delimiter,
headerColumns.Select(EscapeCsvValue));
// The file is empty or contains only blank lines.
// Rewrite it so that the header is always the first row.
File.WriteAllText(
cfg.DataSource,
headerLine + Environment.NewLine,
Encoding.UTF8);
}
else
{
headerColumns = ParseCsvLine(
firstNonEmptyLine,
delimiter[0])
.Select(value => value.Trim())
.ToArray();
if (headerColumns.Length == 0 ||
headerColumns.All(string.IsNullOrWhiteSpace))
{
return Fail("CSV file does not contain a valid header.");
}
if (headerColumns.Any(string.IsNullOrWhiteSpace))
{
return Fail(
"CSV header contains an empty column name.");
}
string[] duplicateHeaderColumns = headerColumns
.GroupBy(
name => name,
StringComparer.OrdinalIgnoreCase)
.Where(g => g.Count() > 1)
.Select(g => g.Key)
.ToArray();
if (duplicateHeaderColumns.Length > 0)
{
return Fail(
"CSV header contains duplicate columns: " +
string.Join(", ", duplicateHeaderColumns));
}
}
string[] missingColumns = request.InsertItems
.Select(item => item.ColumnName)
.Where(name => !headerColumns.Contains(
name,
StringComparer.OrdinalIgnoreCase))
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToArray();
if (missingColumns.Length > 0)
{
return Fail(
"CSV header does not contain columns: " +
string.Join(", ", missingColumns));
}
string[] values = headerColumns
.Select(columnName =>
{
string value;
return valuesByColumn.TryGetValue(columnName, out value)
? EscapeCsvValue(value)
: string.Empty;
})
.ToArray();
string line = string.Join(delimiter, values);
File.AppendAllText(cfg.DataSource, line + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(
cfg.DataSource,
line + Environment.NewLine,
Encoding.UTF8);
return new WriterDiagnosticResult
{
@ -132,6 +263,76 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.Writers
};
}
/// <summary>
/// Parses a single CSV line while respecting quoted values.
/// </summary>
/// <param name="line">
/// CSV line to parse.
/// </param>
/// <param name="delimiter">
/// Character separating individual fields.
/// </param>
/// <returns>
/// Parsed CSV field values.
/// </returns>
/// <exception cref="InvalidOperationException">
/// Thrown when the line contains an unterminated quoted value.
/// </exception>
private string[] ParseCsvLine(string line, char delimiter)
{
if (line == null)
return new string[0];
List<string> values = new List<string>();
StringBuilder currentValue = new StringBuilder();
bool insideQuotes = false;
for (int index = 0; index < line.Length; index++)
{
char character = line[index];
if (character == '"')
{
bool escapedQuote =
insideQuotes &&
index + 1 < line.Length &&
line[index + 1] == '"';
if (escapedQuote)
{
currentValue.Append('"');
index++;
}
else
{
insideQuotes = !insideQuotes;
}
continue;
}
if (character == delimiter && !insideQuotes)
{
values.Add(currentValue.ToString());
currentValue.Clear();
continue;
}
currentValue.Append(character);
}
if (insideQuotes)
{
throw new InvalidOperationException(
"CSV line contains an unterminated quoted value.");
}
values.Add(currentValue.ToString());
return values.ToArray();
}
/// <summary>
/// Update mode:
/// CSV has no natural SQL-style row update, so current implementation writes

File diff suppressed because it is too large Load Diff

View File

@ -108,6 +108,21 @@
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.105.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.105.0\lib\netstandard2.0\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="ClosedXML.Parser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1d5f7376574c51ec, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.Parser.2.0.0\lib\netstandard2.0\ClosedXML.Parser.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.1.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.1.1\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.1.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.1.1\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
</Reference>
@ -120,6 +135,9 @@
<Reference Include="Logic.ProductionToProductMapper">
<HintPath>..\packages\Common\Logic.ProductionToProductMapper.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
@ -141,10 +159,19 @@
<HintPath>..\packages\Oracle.ManagedDataAccess.19.11.0\lib\net40\Oracle.ManagedDataAccess.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="RBush, Version=4.0.0.0, Culture=neutral, PublicKeyToken=c77e27b81f4d0187, processorArchitecture=MSIL">
<HintPath>..\packages\RBush.Signed.4.0.0\lib\net47\RBush.dll</HintPath>
</Reference>
<Reference Include="Renci.SshNet">
<HintPath>..\packages\Renci.SshNet\Renci.SshNet.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Fonts.1.0.0\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
@ -157,13 +184,19 @@
<HintPath>..\packages\System.Drawing.Common.9.0.5\lib\net462\System.Drawing.Common.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@ -173,6 +206,7 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WindowsBase" />
<Reference Include="Xylem.Common.CommonCore">
<HintPath>..\packages\Common\Xylem.Common.CommonCore.dll</HintPath>
</Reference>
@ -1223,6 +1257,7 @@
<Compile Include="Rig\Output\DataStorage\UniDataStorageWriter\UI\WriterCfgCtrl.designer.cs">
<DependentUpon>WriterCfgCtrl.cs</DependentUpon>
</Compile>
<Compile Include="Rig\Output\DataStorage\UniDataStorageWriter\Writers\XlsxWriter.cs" />
<Compile Include="Rig\Output\DB\DatabaseWriter\Factory.cs" />
<Compile Include="Rig\Output\DB\DatabaseWriter\WriteDBCfgCtrl.cs">
<SubType>UserControl</SubType>

View File

@ -83,6 +83,22 @@
<assemblyIdentity name="Xylem.Common.Utils.ByteArrayStyle" publicKeyToken="null" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.8.18.24507" newVersion="2.8.18.24507" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<oracle.manageddataaccess.client>

View File

@ -1,18 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="5.1.1" targetFramework="net472" />
<package id="ClosedXML" version="0.105.0" targetFramework="net48" />
<package id="ClosedXML.Parser" version="2.0.0" targetFramework="net48" />
<package id="DocumentFormat.OpenXml" version="3.1.1" targetFramework="net48" />
<package id="DocumentFormat.OpenXml.Framework" version="3.1.1" targetFramework="net48" />
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net48" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net40" />
<package id="Iesi.Collections" version="4.0.0.4000" targetFramework="net40" />
<package id="log4net" version="2.0.15" targetFramework="net472" />
<package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net48" />
<package id="MySql.Data" version="6.6.5" targetFramework="net20" requireReinstallation="true" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
<package id="NHibernate" version="4.0.4.4000" targetFramework="net40" />
<package id="NLog" version="5.2.2" targetFramework="net48" />
<package id="Oracle.ManagedDataAccess" version="19.11.0" targetFramework="net472" />
<package id="RBush.Signed" version="4.0.0" targetFramework="net48" />
<package id="SixLabors.Fonts" version="1.0.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Data.SQLite" version="1.0.90.0" targetFramework="net40" requireReinstallation="true" />
<package id="System.Drawing.Common" version="9.0.5" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.0" targetFramework="net48" />
<package id="System.Threading" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
</packages>

View File

@ -14,6 +14,18 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -9,6 +9,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -9,6 +9,22 @@
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>