Skip to content

Commit 6e56982

Browse files
authored
Merge pull request #22 from data-solution-automation-engine/dev
Dev
2 parents 00aa46e + 7faa82d commit 6e56982

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

DataWarehouseAutomation/DataWarehouseAutomation/DataClassification.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ public class DataClassification
1919
public string Classification { get; set; } = "NewClassification";
2020

2121
/// <summary>
22-
/// Free-format notes on the data classification.
22+
/// Free-format notes on the Data Classification.
2323
/// </summary>
2424
[JsonPropertyName("notes")]
2525
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
2626
public string? Notes { get; set; }
2727

2828
#region Methods
2929
/// <summary>
30-
/// Use this method to assert if two DataClassifications are the same, based on their Id.
30+
/// Use this method to assert if two Data Classifications are the same, based on their Ids.
3131
/// </summary>
3232
/// <param name="obj"></param>
33-
/// <returns>bool</returns>
33+
/// <returns>True if the Data Classifications are the same, based on their Ids</returns>
3434
public override bool Equals(object? obj)
3535
{
3636
var other = obj as DataClassification;
@@ -40,14 +40,14 @@ public override bool Equals(object? obj)
4040
/// <summary>
4141
/// Override to get a hash value that represents the identifier.
4242
/// </summary>
43-
/// <returns>int</returns>
43+
/// <returns>A 32-bit signed integer hash code</returns>
4444
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
4545

4646
/// <summary>
4747
/// String override so that the object returns the classification value ('classification').
4848
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Classification" property will be returned.
4949
/// </summary>
50-
/// <returns>string</returns>
50+
/// <returns>The Classification value</returns>
5151
public override string ToString()
5252
{
5353
return Classification;

DataWarehouseAutomation/DataWarehouseAutomation/DataConnection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public class DataConnection : IMetadata
4242

4343
#region Methods
4444
/// <summary>
45-
/// Use this method to assert if two DataConnections are the same, based on their Id.
45+
/// Use this method to assert if two Data Connections are the same, based on their Ids.
4646
/// </summary>
4747
/// <param name="obj"></param>
48-
/// <returns>bool</returns>
48+
/// <returns>True if the Data Connections are the same, based on their Ids</returns>
4949
public override bool Equals(object? obj)
5050
{
5151
var other = obj as DataConnection;
@@ -55,14 +55,14 @@ public override bool Equals(object? obj)
5555
/// <summary>
5656
/// Override to get a hash value that represents the identifier.
5757
/// </summary>
58-
/// <returns>int</returns>
58+
/// <returns>A 32-bit signed integer hash code</returns>
5959
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
6060

6161
/// <summary>
6262
/// String override so that the object returns its value ('connection string').
6363
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Connection String" property will be returned.
6464
/// </summary>
65-
/// <returns>string</returns>
65+
/// <returns>The Name</returns>
6666
public override string ToString()
6767
{
6868
return Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataItem.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class DataItem : IDataItem
1111

1212
[JsonPropertyName("name")]
1313
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
14-
public string Name { get; set; }
14+
public string Name { get; set; } = "NewDataItem";
1515

1616
/// <summary>
1717
/// The data object to which the data item belongs. This can be used to construct fully qualified names.
@@ -67,10 +67,10 @@ public class DataItem : IDataItem
6767

6868
#region Methods
6969
/// <summary>
70-
/// Use this method to assert if two DataItems are the same, based on their Id.
70+
/// Use this method to assert if two Data Items are the same, based on their Ids.
7171
/// </summary>
7272
/// <param name="obj"></param>
73-
/// <returns>bool</returns>
73+
/// <returns>True if the Data Items are the same, based on their Ids</returns>
7474
public override bool Equals(object? obj)
7575
{
7676
var other = obj as DataItem;
@@ -80,14 +80,14 @@ public override bool Equals(object? obj)
8080
/// <summary>
8181
/// Override to get a hash value that represents the identifier.
8282
/// </summary>
83-
/// <returns>int</returns>
83+
/// <returns>A 32-bit signed integer hash code</returns>
8484
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
8585

8686
/// <summary>
8787
/// String override so that the object returns its value ('name').
8888
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Name" property will be returned.
8989
/// </summary>
90-
/// <returns>string</returns>
90+
/// <returns>The Name</returns>
9191
public override string ToString()
9292
{
9393
return Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataItemMapping.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public class DataItemMapping
2727

2828
#region Methods
2929
/// <summary>
30-
/// Use this method to assert if two DataItemMappings are the same, based on their Id.
30+
/// Use this method to assert if two DataItemMappings are the same, based on their Ids.
3131
/// </summary>
3232
/// <param name="obj"></param>
33-
/// <returns>bool</returns>
33+
/// <returns>True if the Data Item Mappings are the same, based on their Ids</returns>
3434
public override bool Equals(object? obj)
3535
{
3636
var other = obj as DataItemMapping;
@@ -40,14 +40,14 @@ public override bool Equals(object? obj)
4040
/// <summary>
4141
/// Override to get a hash value that represents the identifier.
4242
/// </summary>
43-
/// <returns>int</returns>
43+
/// <returns>A 32-bit signed integer hash code</returns>
4444
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
4545

4646
/// <summary>
4747
/// String override so that the object returns its value ('name of the target data item').
4848
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the Data Item "Name" property will be returned.
4949
/// </summary>
50-
/// <returns>string</returns>
50+
/// <returns>The Target Data Item's Name</returns>
5151
public override string ToString()
5252
{
5353
return TargetDataItem.Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataItemQuery.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public class DataItemQuery : IDataItem
8181

8282
#region Methods
8383
/// <summary>
84-
/// Use this method to assert if two DataItemQueries are the same, based on their Id.
84+
/// Use this method to assert if two Data Item Queries are the same, based on their Ids.
8585
/// </summary>
8686
/// <param name="obj"></param>
87-
/// <returns>bool</returns>
87+
/// <returns>True if the Data Item Queries are the same, based on their Ids</returns>
8888
public override bool Equals(object? obj)
8989
{
9090
var other = obj as DataItemQuery;
@@ -94,14 +94,14 @@ public override bool Equals(object? obj)
9494
/// <summary>
9595
/// Override to get a hash value that represents the identifier.
9696
/// </summary>
97-
/// <returns>int</returns>
97+
/// <returns>A 32-bit signed integer hash code</returns>
9898
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
9999

100100
/// <summary>
101101
/// String override so that the object returns its value ('name').
102102
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Name" property will be returned.
103103
/// </summary>
104-
/// <returns>string</returns>
104+
/// <returns>The Name</returns>
105105
public override string ToString()
106106
{
107107
return Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataObject.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ public class DataObject : IMetadata, IDataObject
5757

5858
#region Methods
5959
/// <summary>
60-
/// Use this method to assert if two DataObjects are the same, based on their Id.
60+
/// Use this method to assert if two Data Objects are the same, based on their Ids.
6161
/// </summary>
6262
/// <param name="obj"></param>
63-
/// <returns>bool</returns>
63+
/// <returns>True if the Data Objects are the same, based on their Ids</returns>
6464
public override bool Equals(object? obj)
6565
{
6666
var other = obj as DataObject;
@@ -69,14 +69,14 @@ public override bool Equals(object? obj)
6969
/// <summary>
7070
/// Override to get a hash value that represents the identifier.
7171
/// </summary>
72-
/// <returns>int</returns>
72+
/// <returns>A 32-bit signed integer hash code</returns>
7373
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
7474

7575
/// <summary>
7676
/// String override so that the object returns its value ('name').
7777
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Name" property will be returned.
7878
/// </summary>
79-
/// <returns></returns>
79+
/// <returns>The Name</returns>
8080
public override string ToString()
8181
{
8282
return Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataObjectMapping.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ public class DataObjectMapping : IMetadata
101101

102102
#region Methods
103103
/// <summary>
104-
/// Use this method to assert if two DataObjectMappings are the same, based on their Id.
104+
/// Use this method to assert if two Data Object Mappings are the same, based on their Ids.
105105
/// </summary>
106106
/// <param name="obj"></param>
107-
/// <returns>bool</returns>
107+
/// <returns>True if the Data Object Mappings are the same, based on their Ids</returns>
108108
public override bool Equals(object? obj)
109109
{
110110
var other = obj as DataObjectMapping;
@@ -114,14 +114,14 @@ public override bool Equals(object? obj)
114114
/// <summary>
115115
/// Override to get a hash value that represents the identifier.
116116
/// </summary>
117-
/// <returns>int</returns>
117+
/// <returns>A 32-bit signed integer hash code</returns>
118118
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
119119

120120
/// <summary>
121121
/// String override so that the object returns its value ('Name').
122122
/// When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the "Name" property will be returned.
123123
/// </summary>
124-
/// <returns></returns>
124+
/// <returns>The Name</returns>
125125
public override string ToString()
126126
{
127127
return Name;

DataWarehouseAutomation/DataWarehouseAutomation/DataObjectQuery.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public class DataObjectQuery : IDataObject
5959

6060
#region Methods
6161
/// <summary>
62-
/// Use this method to assert if two DataObjectQueries are the same, based on their Id.
62+
/// Use this method to assert if two DataObjectQueries are the same, based on their Ids.
6363
/// </summary>
6464
/// <param name="obj"></param>
65-
/// <returns>bool</returns>
65+
/// <returns>true if Data Object Queries are the same, based on their Ids</returns>
6666
public override bool Equals(object? obj)
6767
{
6868
var other = obj as DataObjectQuery;
@@ -72,7 +72,7 @@ public override bool Equals(object? obj)
7272
/// <summary>
7373
/// Override to get a hash value that represents the identifier.
7474
/// </summary>
75-
/// <returns>int</returns>
75+
/// <returns>A 32-bit signed integer hash code</returns>
7676
public override int GetHashCode() => (Id?.GetHashCode()) ?? 0;
7777

7878
/// <summary>

DataWarehouseAutomation/DataWarehouseAutomation/HandleBarsHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public static void RegisterHandleBarsHelpers()
277277
// Run at data object mapping level.
278278
Handlebars.RegisterHelper("exists", (output, options, context, arguments) =>
279279
{
280-
if (arguments.Length == 0 || arguments.Length>2) throw new HandlebarsException("The {{exists}} function must have one or two arguments, which must be a property of a data object mapping which is mandatory and an optional exception value.");
280+
if (arguments.Length == 0 || arguments.Length > 2) throw new HandlebarsException("The {{exists}} function must have one or two arguments, which must be a property of a data object mapping which is mandatory and an optional exception value.");
281281

282282
var property = arguments[0] == null ? "" : arguments[0].ToString();
283283

@@ -327,7 +327,7 @@ public static void RegisterHandleBarsHelpers()
327327
}
328328
else if (property == "targetDataItem")
329329
{
330-
var targetDataItem = dataObjectMapping?.DataItemMappings?.Where(x => x.TargetDataItem != null).FirstOrDefault();
330+
var targetDataItem = dataObjectMapping?.DataItemMappings?.Find(x => x.TargetDataItem != null);
331331

332332
if (targetDataItem != null)
333333
{
@@ -367,7 +367,7 @@ public static void RegisterHandleBarsHelpers()
367367

368368
var extensionList = JsonSerializer.Deserialize<List<Extension>>(parameters[0].ToString() ?? string.Empty);
369369
var key = (string)parameters[1];
370-
var result = extensionList.Find(i => i.Key.Equals(key, StringComparison.OrdinalIgnoreCase))?.Value ?? "";
370+
var result = extensionList?.Find(i => i.Key.Equals(key, StringComparison.OrdinalIgnoreCase))?.Value ?? "";
371371

372372
writer.WriteSafeString($"{result}");
373373
});

0 commit comments

Comments
 (0)