Skip to content

Commit 496e0af

Browse files
committed
Improved file handling and also double handling of files, based on reported issues with Json formats that don't match the expected schema.
1 parent 4d3045a commit 496e0af

18 files changed

+1698
-6258
lines changed

Virtual_Data_Warehouse_Library/EnvironmentConfiguration.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

Virtual_Data_Warehouse_Library/Virtual_Data_Warehouse_Library.csproj

Lines changed: 0 additions & 13 deletions
This file was deleted.

Virtual_EDW/App.config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@
4949
<assemblyIdentity name="System.Data.SqlClient" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
5050
<bindingRedirect oldVersion="0.0.0.0-4.6.1.2" newVersion="4.6.1.2" />
5151
</dependentAssembly>
52+
<dependentAssembly>
53+
<assemblyIdentity name="System.Security.Principal.Windows" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
54+
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
55+
</dependentAssembly>
56+
<dependentAssembly>
57+
<assemblyIdentity name="System.Security.Cryptography.ProtectedData" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
58+
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
59+
</dependentAssembly>
60+
<dependentAssembly>
61+
<assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0a613f4dd989e8ae" culture="neutral" />
62+
<bindingRedirect oldVersion="0.0.0.0-4.22.0.0" newVersion="4.22.0.0" />
63+
</dependentAssembly>
5264
</assemblyBinding>
5365
</runtime>
5466
</configuration>

Virtual_EDW/CustomDataGridView.cs

Lines changed: 0 additions & 77 deletions
This file was deleted.

Virtual_EDW/CustomTabPage.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Data.SqlClient;
3+
using Microsoft.Data.SqlClient;
44
using System.Drawing;
55
using System.IO;
66
using System.Linq;
@@ -311,7 +311,7 @@ public CustomTabPage(string classification, string notes, Dictionary<string, VDW
311311
SetItemList(itemList);
312312

313313
// Report back to the user if there is not metadata available
314-
if (itemList.Count == 0)
314+
if (itemList == null || itemList.Count == 0)
315315
{
316316
_localRichTextBox.Text =
317317
$"There was no metadata available to display {_inputNiceName} content. Please check the associated metadata schema (are there any {_inputNiceName} records available?) or the database connection.\r\n\r\n";
@@ -359,11 +359,14 @@ public void SetItemList(Dictionary<string, VDW_DataObjectMappingList> itemList)
359359
_localCheckedListBox.Items.Clear();
360360

361361
// Add items to the Checked List Box, if it satisfies the filter criterion
362-
foreach (string item in itemList.Keys)
362+
if (itemList != null && itemList.Count > 0)
363363
{
364-
if (item.Contains(_localTextBoxFilter.Text))
364+
foreach (string item in itemList.Keys)
365365
{
366-
_localCheckedListBox.Items.Add(item);
366+
if (item.Contains(_localTextBoxFilter.Text))
367+
{
368+
_localCheckedListBox.Items.Add(item);
369+
}
367370
}
368371
}
369372

Virtual_EDW/Form_Base.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.IO;
23
using System.Windows.Forms;
34
using TEAM;
45

@@ -49,6 +50,9 @@ internal static class GlobalParameters
4950
public static string JsonConnectionFileName { get; } = "TEAM_connections";
5051
public static string JsonEnvironmentFileName { get; } = "TEAM_environments";
5152
public static string JsonExtension { get; } = ".json";
53+
54+
public static string JsonSchemaForDataWarehouseAutomationFileName { get; } = "interfaceDataWarehouseAutomationMetadata.json";
55+
//public static string DataWarehouseSchemaDefinition { get; } = File.ReadAllText(Application.StartupPath + @"\Schema\" + JsonSchemaForDataWarehouseAutomationFileName);
5256
}
5357

5458

@@ -67,7 +71,6 @@ internal static class VdwConfigurationSettings
6771
public static string VdwExamplesPath { get; set; } = Application.StartupPath + @"\Examples\";
6872

6973

70-
7174
// Parameters that can be changed at runtime
7275
public static string hashingStartSnippet { get; set; }
7376
public static string hashingEndSnippet { get; set; }

Virtual_EDW/Form_Generation.Designer.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.

Virtual_EDW/Form_Generation.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

Virtual_EDW/Form_Generation.resx

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)