Skip to content

Commit 10fa014

Browse files
author
Nicolaj Hansen
committed
Using the new script type provider handles new dependency related column mappings and the associated values
1 parent c1658d5 commit 10fa014

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/Dynamicweb.DataIntegration.Providers.DynamicwebProvider.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2424
</PropertyGroup>
2525
<ItemGroup>
26-
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.9.0" />
26+
<PackageReference Include="Dynamicweb.DataIntegration" Version="10.11.2" />
2727
<PackageReference Include="Dynamicweb.Ecommerce" Version="10.9.0" />
2828
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
2929
</ItemGroup>

src/DynamicwebProvider.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Dynamicweb.Data;
33
using Dynamicweb.DataIntegration.Integration;
44
using Dynamicweb.DataIntegration.Integration.Interfaces;
5+
using Dynamicweb.DataIntegration.Integration.ScriptTypes;
56
using Dynamicweb.DataIntegration.ProviderHelpers;
67
using Dynamicweb.Extensibility.AddIns;
78
using Dynamicweb.Extensibility.Editors;
@@ -498,8 +499,10 @@ public override bool RunJob(Job job)
498499
{
499500
Column randomColumn = mapping.SourceTable.Columns.First();
500501
var languageColumnMapping = mapping.AddMapping(randomColumn, mapping.DestinationTable.Columns.Find(c => string.Compare(c.Name, MappingExtensions.GetLanguageIdColumnName(mapping.DestinationTable.Name), true) == 0));
501-
languageColumnMapping.ScriptType = ScriptType.Constant;
502-
languageColumnMapping.ScriptValue = defaultLanguage;
502+
languageColumnMapping.ScriptTypeProvider = new ConstantScriptType()
503+
{
504+
ScriptValue = defaultLanguage
505+
};
503506
}
504507
}
505508

@@ -510,8 +513,10 @@ public override bool RunJob(Job job)
510513
{
511514
Column randomColumn = mapping.SourceTable.Columns.First();
512515
var shopColumnMapping = mapping.AddMapping(randomColumn, mapping.DestinationTable.Columns.Find(c => string.Compare(c.Name, MappingExtensions.GetShopIdColumnName(mapping.DestinationTable.Name), true) == 0));
513-
shopColumnMapping.ScriptType = ScriptType.Constant;
514-
shopColumnMapping.ScriptValue = Shop;
516+
shopColumnMapping.ScriptTypeProvider = new ConstantScriptType()
517+
{
518+
ScriptValue = Shop
519+
};
515520
}
516521
}
517522

0 commit comments

Comments
 (0)