Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GetId #32

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.8.0</Version>
<Version>10.8.1</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>Order Provider</Title>
<Description>Order Provider</Description>
Expand Down
12 changes: 9 additions & 3 deletions src/OrderProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
return Schema;
}

string ISource.GetId() => "Source|OrderProvider";

string IDestination.GetId() => "Destination|OrderProvider";

public OrderProvider(XmlNode xmlNode)
{
foreach (XmlNode node in xmlNode.ChildNodes)
Expand Down Expand Up @@ -232,7 +236,8 @@
xmlTextWriter.WriteElementString("DiscardDuplicates", DiscardDuplicates.ToString(CultureInfo.CurrentCulture));
xmlTextWriter.WriteElementString("RemoveMissingOrderLines", RemoveMissingOrderLines.ToString(CultureInfo.CurrentCulture));
xmlTextWriter.WriteElementString("SkipFailingRows", SkipFailingRows.ToString());
(this as ISource).GetSchema().SaveAsXml(xmlTextWriter);
if (!Feature.IsActive<SchemaManagementFeature>())
(this as ISource).GetSchema().SaveAsXml(xmlTextWriter);
}

void IDestination.SaveAsXml(XmlTextWriter xmlTextWriter)
Expand All @@ -245,7 +250,8 @@
xmlTextWriter.WriteElementString("DiscardDuplicates", DiscardDuplicates.ToString(CultureInfo.CurrentCulture));
xmlTextWriter.WriteElementString("RemoveMissingOrderLines", RemoveMissingOrderLines.ToString(CultureInfo.CurrentCulture));
xmlTextWriter.WriteElementString("SkipFailingRows", SkipFailingRows.ToString());
(this as IDestination).GetSchema().SaveAsXml(xmlTextWriter);
if (!Feature.IsActive<SchemaManagementFeature>())
(this as IDestination).GetSchema().SaveAsXml(xmlTextWriter);
}

public override void UpdateSourceSettings(ISource source)
Expand Down Expand Up @@ -380,7 +386,7 @@
sqlTransaction = Connection.BeginTransaction();
foreach (OrderDestinationWriter writer in writers)
{
TotalRowsAffected += writer.MoveDataToMainTable(sqlTransaction, false, false);
writer.MoveDataToMainTable(sqlTransaction, false, false);
}

RemoveMissingRows(writers, sqlTransaction);
Expand Down Expand Up @@ -664,7 +670,7 @@
}
}

private string GetValue(ColumnMapping? columnMapping, Dictionary<string, object> row)

Check warning on line 673 in src/OrderProvider.cs

View workflow job for this annotation

GitHub Actions / call-workflow / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 673 in src/OrderProvider.cs

View workflow job for this annotation

GitHub Actions / call-workflow / Build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
string result = null;
if (columnMapping != null && (columnMapping.HasScriptWithValue || row.ContainsKey(columnMapping.SourceColumn.Name)))
Expand Down
Loading