diff --git a/AgileMapper.Buildable.UnitTests.NetCore3/AgileMapper.Buildable.UnitTests.NetCore3.csproj b/AgileMapper.Buildable.UnitTests.NetCore3/AgileMapper.Buildable.UnitTests.NetCore3.csproj
new file mode 100644
index 000000000..2a205221e
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetCore3/AgileMapper.Buildable.UnitTests.NetCore3.csproj
@@ -0,0 +1,41 @@
+
+
+
+ netcoreapp3.1
+ AgileObjects.AgileMapper.Buildable.UnitTests.NetCore3
+ AgileObjects.AgileMapper.Buildable.UnitTests
+ true
+
+ 0649;1701;1702
+ false
+
+
+
+ true
+ ..\AgileMapper.Buildable.UnitTests.NetStandard2.Mappers\AgileMapper.Buildable.UnitTests.NetStandard2.Mappers.csproj
+
+
+
+
+ %(RecursiveDir)%(Filename)%(Extension)
+
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Generator/AgileMapper.Buildable.UnitTests.NetStandard2.Generator.csproj b/AgileMapper.Buildable.UnitTests.NetStandard2.Generator/AgileMapper.Buildable.UnitTests.NetStandard2.Generator.csproj
new file mode 100644
index 000000000..4309960f6
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Generator/AgileMapper.Buildable.UnitTests.NetStandard2.Generator.csproj
@@ -0,0 +1,31 @@
+
+
+
+ netstandard2.0
+ AgileObjects.AgileMapper.Buildable.UnitTests.NetStandard2.Generator
+ AgileObjects.AgileMapper.Buildable.UnitTests.Generator
+
+
+
+ false
+ ..\AgileMapper.Buildable.UnitTests.NetStandard2.Mappers\AgileMapper.Buildable.UnitTests.NetStandard2.Mappers.csproj
+
+
+
+
+ MapperConfiguration\%(RecursiveDir)%(Filename)%(Extension)
+
+
+ MapperConfiguration\%(RecursiveDir)%(Filename)%(Extension)
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers.csproj b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers.csproj
new file mode 100644
index 000000000..2864f9f03
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers.csproj
@@ -0,0 +1,13 @@
+
+
+
+ netstandard2.0
+ AgileObjects.AgileMapper.Buildable.UnitTests.NetStandard2.Mappers
+ AgileObjects.AgileMapper.Buildable.UnitTests
+
+
+
+
+
+
+
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressAddressPublicTwoFieldsMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressAddressPublicTwoFieldsMapper.cs
new file mode 100644
index 000000000..a980cbae6
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressAddressPublicTwoFieldsMapper.cs
@@ -0,0 +1,118 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class AddressAddressPublicTwoFieldsMapper : MappingExecutionContextBase>
+ {
+ public AddressAddressPublicTwoFieldsMapper
+ (
+ PublicTwoFields source
+ )
+ : base(source)
+ {
+ }
+
+ public PublicTwoFields ToANew()
+ where TTarget : PublicTwoFields
+ {
+ return AddressAddressPublicTwoFieldsMapper.CreateNew(this.CreateRootMappingData(default(PublicTwoFields)));
+ }
+
+ private static PublicTwoFields CreateNew
+ (
+ IObjectMappingData, PublicTwoFields> aaptfToAaptfData
+ )
+ {
+ PublicTwoFields sourceAddressAddressPublicTwoFields;
+ try
+ {
+ sourceAddressAddressPublicTwoFields = aaptfToAaptfData.Source;
+
+ var addressAddressPublicTwoFields = new PublicTwoFields();
+
+ if (sourceAddressAddressPublicTwoFields.Value1 != null)
+ {
+ addressAddressPublicTwoFields.Value1 = AddressAddressPublicTwoFieldsMapper.GetAddress1(addressAddressPublicTwoFields, sourceAddressAddressPublicTwoFields);
+ }
+
+ if (sourceAddressAddressPublicTwoFields.Value2 != null)
+ {
+ addressAddressPublicTwoFields.Value2 = AddressAddressPublicTwoFieldsMapper.GetAddress2(addressAddressPublicTwoFields, sourceAddressAddressPublicTwoFields);
+ }
+
+ return addressAddressPublicTwoFields;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicTwoFields",
+ "PublicTwoFields",
+ ex);
+ }
+ }
+
+ private static Address GetAddress1
+ (
+ PublicTwoFields addressAddressPublicTwoFields,
+ PublicTwoFields sourceAddressAddressPublicTwoFields
+ )
+ {
+ try
+ {
+ var address = addressAddressPublicTwoFields.Value1 ?? new Address();
+ address.Line1 = sourceAddressAddressPublicTwoFields.Value1.Line1;
+ address.Line2 = sourceAddressAddressPublicTwoFields.Value1.Line2;
+
+ return address;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicTwoFields.Value1",
+ "PublicTwoFields.Value1",
+ ex);
+ }
+ }
+
+ private static Address GetAddress2
+ (
+ PublicTwoFields addressAddressPublicTwoFields,
+ PublicTwoFields sourceAddressAddressPublicTwoFields
+ )
+ {
+ try
+ {
+ var address = addressAddressPublicTwoFields.Value2 ?? new Address();
+ address.Line1 = sourceAddressAddressPublicTwoFields.Value2.Line1;
+ address.Line2 = sourceAddressAddressPublicTwoFields.Value2.Line2;
+
+ return address;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicTwoFields.Value2",
+ "PublicTwoFields.Value2",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressMapper.cs
new file mode 100644
index 000000000..e25279b40
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/AddressMapper.cs
@@ -0,0 +1,97 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class AddressMapper : MappingExecutionContextBase
+ {
+ public AddressMapper
+ (
+ Address source
+ )
+ : base(source)
+ {
+ }
+
+ public Address OnTo
+ (
+ Address target
+ )
+ {
+ return AddressMapper.Merge(this.CreateRootMappingData(target));
+ }
+
+ public Address Over
+ (
+ Address target
+ )
+ {
+ return AddressMapper.Overwrite(this.CreateRootMappingData(target));
+ }
+
+ private static Address Merge
+ (
+ IObjectMappingData aToAData
+ )
+ {
+ try
+ {
+ if (aToAData.Target.Line1 == null)
+ {
+ aToAData.Target.Line1 = aToAData.Source.Line1;
+ }
+
+ if (aToAData.Target.Line2 == null)
+ {
+ aToAData.Target.Line2 = aToAData.Source.Line2;
+ }
+
+ return aToAData.Target;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Address",
+ "Address",
+ ex);
+ }
+ }
+
+ private static Address Overwrite
+ (
+ IObjectMappingData aToAData
+ )
+ {
+ try
+ {
+ aToAData.Target.Line1 = aToAData.Source.Line1;
+ aToAData.Target.Line2 = aToAData.Source.Line2;
+
+ return aToAData.Target;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "Address",
+ "Address",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/CharArrayMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/CharArrayMapper.cs
new file mode 100644
index 000000000..f7d8cd8e4
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/CharArrayMapper.cs
@@ -0,0 +1,67 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Linq;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class CharArrayMapper : MappingExecutionContextBase
+ {
+ public CharArrayMapper
+ (
+ char[] source
+ )
+ : base(source)
+ {
+ }
+
+ public int[] Over
+ (
+ int[] target
+ )
+ {
+ return CharArrayMapper.Overwrite(this.CreateRootMappingData(target));
+ }
+
+ private static int[] Overwrite
+ (
+ IObjectMappingData caToIaData
+ )
+ {
+ try
+ {
+ return caToIaData.Source.Project(c => CharArrayMapper.GetInt(c)).ToArray();
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "char[]",
+ "int[]",
+ ex);
+ }
+ }
+
+ private static int GetInt
+ (
+ char c
+ )
+ {
+ int intValue;
+ return int.TryParse(c.ToString(), out intValue) ? intValue : default(int);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ChildMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ChildMapper.cs
new file mode 100644
index 000000000..a004986c5
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ChildMapper.cs
@@ -0,0 +1,170 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class ChildMapper : MappingExecutionContextBase
+ {
+ public ChildMapper
+ (
+ Child source
+ )
+ : base(source)
+ {
+ }
+
+ public Child ToANew()
+ where TTarget : Child
+ {
+ return ChildMapper.CreateNew(this.CreateRootMappingData(default(Child)));
+ }
+
+ private static Child MapRepeated
+ (
+ IObjectMappingData cToCData2
+ )
+ {
+ try
+ {
+ Child child;
+
+ if (cToCData2.TryGet(cToCData2.Source, out child))
+ {
+ return child;
+ }
+
+ child = cToCData2.Target ?? new Child();
+ cToCData2.Register(cToCData2.Source, child);
+ child.Name = cToCData2.Source.Name;
+
+ if (cToCData2.Source.EldestParent != null)
+ {
+ child.EldestParent = ChildMapper.MapRepeated(
+ MappingExecutionContextBase.CreateChildMappingData(cToCData2.Source.EldestParent, child.EldestParent, cToCData2));
+ }
+
+ return child;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "Child.EldestParent.EldestChild",
+ "Child.EldestParent.EldestChild",
+ ex);
+ }
+ }
+
+ private static Parent MapRepeated
+ (
+ IObjectMappingData pToPData2
+ )
+ {
+ try
+ {
+ Parent parent;
+
+ if (pToPData2.TryGet(pToPData2.Source, out parent))
+ {
+ return parent;
+ }
+
+ parent = pToPData2.Target ?? new Parent();
+ pToPData2.Register(pToPData2.Source, parent);
+ parent.Name = pToPData2.Source.Name;
+
+ if (pToPData2.Source.EldestChild != null)
+ {
+ parent.EldestChild = ChildMapper.MapRepeated(
+ MappingExecutionContextBase.CreateChildMappingData(pToPData2.Source.EldestChild, parent.EldestChild, pToPData2));
+ }
+
+ return parent;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "Child.EldestChild.EldestParent",
+ "Child.EldestParent.EldestChild.EldestParent",
+ ex);
+ }
+ }
+
+ private static Child CreateNew
+ (
+ IObjectMappingData cToCData
+ )
+ {
+ Child sourceChild;
+ try
+ {
+ sourceChild = cToCData.Source;
+
+ var child = new Child();
+ cToCData.Register(sourceChild, child);
+ child.Name = sourceChild.Name;
+
+ if (sourceChild.EldestParent != null)
+ {
+ child.EldestParent = ChildMapper.GetParent(child, cToCData, sourceChild);
+ }
+
+ return child;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "Child",
+ "Child",
+ ex);
+ }
+ }
+
+ private static Parent GetParent
+ (
+ Child child,
+ IObjectMappingData cToCData,
+ Child sourceChild
+ )
+ {
+ try
+ {
+ var parent = child.EldestParent ?? new Parent();
+ cToCData.Register(sourceChild.EldestParent, parent);
+ parent.Name = sourceChild.EldestParent.Name;
+
+ if (sourceChild.EldestParent.EldestChild != null)
+ {
+ parent.EldestChild = ChildMapper.MapRepeated(
+ MappingExecutionContextBase.CreateChildMappingData(sourceChild.EldestParent.EldestChild, parent.EldestChild, cToCData));
+ }
+
+ return parent;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "Child.EldestParent",
+ "Child.EldestParent",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DateTimeHashSetMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DateTimeHashSetMapper.cs
new file mode 100644
index 000000000..a01419066
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DateTimeHashSetMapper.cs
@@ -0,0 +1,85 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.ReadableExpressions;
+using AgileObjects.ReadableExpressions.Extensions;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class DateTimeHashSetMapper : MappingExecutionContextBase>
+ {
+ public DateTimeHashSetMapper
+ (
+ HashSet source
+ )
+ : base(source)
+ {
+ }
+
+ public TTarget ToANew()
+ {
+ if (typeof(TTarget) == typeof(DateTime[]))
+ {
+ return (TTarget)((object)DateTimeHashSetMapper.CreateNew(this.CreateRootMappingData(default(DateTime[]))));
+ }
+
+ throw new NotSupportedException(
+ "Unable to perform a 'CreateNew' mapping from source type 'HashSet' to target type '" + typeof(TTarget).GetFriendlyName(null) + "'");
+ }
+
+ private static DateTime[] CreateNew
+ (
+ IObjectMappingData, DateTime[]> dthsToDtaData
+ )
+ {
+ try
+ {
+ var sourceDateTimeHashSet = dthsToDtaData.Source;
+ var targetDateTimeList = new List(sourceDateTimeHashSet.Count);
+ var i = 0;
+ var enumerator = sourceDateTimeHashSet.GetEnumerator();
+ try
+ {
+ while (true)
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+
+ targetDateTimeList.Add(enumerator.Current);
+ ++i;
+ }
+ }
+ finally
+ {
+ enumerator.Dispose();
+ }
+
+ return targetDateTimeList.ToArray();
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "HashSet",
+ "DateTime[]",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DecimalArrayMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DecimalArrayMapper.cs
new file mode 100644
index 000000000..b5576c953
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/DecimalArrayMapper.cs
@@ -0,0 +1,80 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class DecimalArrayMapper : MappingExecutionContextBase
+ {
+ public DecimalArrayMapper
+ (
+ decimal[] source
+ )
+ : base(source)
+ {
+ }
+
+ public HashSet OnTo
+ (
+ HashSet target
+ )
+ {
+ return DecimalArrayMapper.Merge(this.CreateRootMappingData(target));
+ }
+
+ private static HashSet Merge
+ (
+ IObjectMappingData> daToDhsData
+ )
+ {
+ try
+ {
+ var sourceDoubleIEnumerable = daToDhsData.Source.Project(d => (double)d).Exclude(daToDhsData.Target);
+ var targetDoubleHashSet = daToDhsData.Target;
+ var i = 0;
+ var enumerator = sourceDoubleIEnumerable.GetEnumerator();
+ try
+ {
+ while (true)
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+
+ targetDoubleHashSet.Add(enumerator.Current);
+ ++i;
+ }
+ }
+ finally
+ {
+ enumerator.Dispose();
+ }
+
+ return targetDoubleHashSet;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "decimal[]",
+ "HashSet",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Extensions/MappingExtensions.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Extensions/MappingExtensions.cs
new file mode 100644
index 000000000..987d137ce
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Extensions/MappingExtensions.cs
@@ -0,0 +1,199 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper.Buildable.UnitTests.Mappers;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers.Extensions
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public static class MappingExtensions
+ {
+ public static AddressAddressPublicTwoFieldsMapper Map
+ (
+ this PublicTwoFields source
+ )
+ {
+ return new AddressAddressPublicTwoFieldsMapper(source);
+ }
+
+ public static PublicTwoFields DeepClone
+ (
+ this PublicTwoFields source
+ )
+ {
+ return new AddressAddressPublicTwoFieldsMapper(source).ToANew>();
+ }
+
+ public static AddressMapper Map
+ (
+ this Address source
+ )
+ {
+ return new AddressMapper(source);
+ }
+
+ public static CharArrayMapper Map
+ (
+ this char[] source
+ )
+ {
+ return new CharArrayMapper(source);
+ }
+
+ public static ChildMapper Map
+ (
+ this Child source
+ )
+ {
+ return new ChildMapper(source);
+ }
+
+ public static Child DeepClone
+ (
+ this Child source
+ )
+ {
+ return new ChildMapper(source).ToANew();
+ }
+
+ public static DateTimeHashSetMapper Map
+ (
+ this HashSet source
+ )
+ {
+ return new DateTimeHashSetMapper(source);
+ }
+
+ public static DecimalArrayMapper Map
+ (
+ this decimal[] source
+ )
+ {
+ return new DecimalArrayMapper(source);
+ }
+
+ public static IntAddressPublicTwoFieldsMapper Map
+ (
+ this PublicTwoFields source
+ )
+ {
+ return new IntAddressPublicTwoFieldsMapper(source);
+ }
+
+ public static IntArrayMapper Map
+ (
+ this int[] source
+ )
+ {
+ return new IntArrayMapper(source);
+ }
+
+ public static IntIEnumerableMapper Map
+ (
+ this IEnumerable source
+ )
+ {
+ return new IntIEnumerableMapper(source);
+ }
+
+ public static IntStringIntToTargetValueSourceMapper Map
+ (
+ this ToTargetValueSource source
+ )
+ {
+ return new IntStringIntToTargetValueSourceMapper(source);
+ }
+
+ public static ProductArrayMapper Map
+ (
+ this Product[] source
+ )
+ {
+ return new ProductArrayMapper(source);
+ }
+
+ public static ProductDtoArrayMapper Map
+ (
+ this ProductDto[] source
+ )
+ {
+ return new ProductDtoArrayMapper(source);
+ }
+
+ public static ProductDtoListMapper Map
+ (
+ this List source
+ )
+ {
+ return new ProductDtoListMapper(source);
+ }
+
+ public static ProductMapper Map
+ (
+ this Product source
+ )
+ {
+ return new ProductMapper(source);
+ }
+
+ public static StringCollectionMapper Map
+ (
+ this Collection source
+ )
+ {
+ return new StringCollectionMapper(source);
+ }
+
+ public static StringListMapper Map
+ (
+ this List source
+ )
+ {
+ return new StringListMapper(source);
+ }
+
+ public static StringMapper Map
+ (
+ this string source
+ )
+ {
+ return new StringMapper(source);
+ }
+
+ public static StringPublicFieldMapper Map
+ (
+ this PublicField source
+ )
+ {
+ return new StringPublicFieldMapper(source);
+ }
+
+ public static StringPublicPropertyMapper Map
+ (
+ this PublicProperty source
+ )
+ {
+ return new StringPublicPropertyMapper(source);
+ }
+
+ public static StringStringDictionaryMapper Map
+ (
+ this Dictionary source
+ )
+ {
+ return new StringStringDictionaryMapper(source);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntAddressPublicTwoFieldsMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntAddressPublicTwoFieldsMapper.cs
new file mode 100644
index 000000000..e028d9ace
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntAddressPublicTwoFieldsMapper.cs
@@ -0,0 +1,65 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class IntAddressPublicTwoFieldsMapper : MappingExecutionContextBase>
+ {
+ public IntAddressPublicTwoFieldsMapper
+ (
+ PublicTwoFields source
+ )
+ : base(source)
+ {
+ }
+
+ public Dictionary ToANew()
+ where TTarget : Dictionary
+ {
+ return IntAddressPublicTwoFieldsMapper.CreateNew(this.CreateRootMappingData(default(Dictionary)));
+ }
+
+ private static Dictionary CreateNew
+ (
+ IObjectMappingData, Dictionary> iaptfToSsdData
+ )
+ {
+ try
+ {
+ var stringStringDictionary = new Dictionary();
+ stringStringDictionary["Value1"] = iaptfToSsdData.Source.Value1.ToString();
+
+ if (iaptfToSsdData.Source.Value2 != null)
+ {
+ stringStringDictionary["Value2.Line1"] = iaptfToSsdData.Source.Value2.Line1;
+ stringStringDictionary["Value2.Line2"] = iaptfToSsdData.Source.Value2.Line2;
+ }
+
+ return stringStringDictionary;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicTwoFields",
+ "Dictionary",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntArrayMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntArrayMapper.cs
new file mode 100644
index 000000000..496a2e484
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntArrayMapper.cs
@@ -0,0 +1,70 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class IntArrayMapper : MappingExecutionContextBase
+ {
+ public IntArrayMapper
+ (
+ int[] source
+ )
+ : base(source)
+ {
+ }
+
+ public ReadOnlyCollection ToANew()
+ where TTarget : ReadOnlyCollection
+ {
+ return IntArrayMapper.CreateNew(this.CreateRootMappingData(default(ReadOnlyCollection)));
+ }
+
+ private static ReadOnlyCollection CreateNew
+ (
+ IObjectMappingData> iaToIrocData
+ )
+ {
+ try
+ {
+ var sourceIntArray = iaToIrocData.Source;
+ var targetIntList = new List(sourceIntArray.Length);
+ var i = 0;
+ while (true)
+ {
+ if (i == sourceIntArray.Length)
+ {
+ break;
+ }
+
+ targetIntList.Add(sourceIntArray[i]);
+ ++i;
+ }
+
+ return targetIntList.AsReadOnly();
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "int[]",
+ "ReadOnlyCollection",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntIEnumerableMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntIEnumerableMapper.cs
new file mode 100644
index 000000000..f9fe81aa9
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntIEnumerableMapper.cs
@@ -0,0 +1,80 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class IntIEnumerableMapper : MappingExecutionContextBase>
+ {
+ public IntIEnumerableMapper
+ (
+ IEnumerable source
+ )
+ : base(source)
+ {
+ }
+
+ public ICollection OnTo
+ (
+ ICollection target
+ )
+ {
+ return IntIEnumerableMapper.Merge(this.CreateRootMappingData(target));
+ }
+
+ private static ICollection Merge
+ (
+ IObjectMappingData, ICollection> iieToIicData
+ )
+ {
+ try
+ {
+ var sourceIntIEnumerable = iieToIicData.Source.Exclude(iieToIicData.Target);
+ ICollection targetIntICollection = iieToIicData.Target.IsReadOnly ? new List(iieToIicData.Target) : iieToIicData.Target;
+ var i = 0;
+ var enumerator = sourceIntIEnumerable.GetEnumerator();
+ try
+ {
+ while (true)
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+
+ targetIntICollection.Add(enumerator.Current);
+ ++i;
+ }
+ }
+ finally
+ {
+ enumerator.Dispose();
+ }
+
+ return targetIntICollection;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "IEnumerable",
+ "ICollection",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntStringIntToTargetValueSourceMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntStringIntToTargetValueSourceMapper.cs
new file mode 100644
index 000000000..ab63e2a18
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/IntStringIntToTargetValueSourceMapper.cs
@@ -0,0 +1,218 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class IntStringIntToTargetValueSourceMapper : MappingExecutionContextBase>
+ {
+ public IntStringIntToTargetValueSourceMapper
+ (
+ ToTargetValueSource source
+ )
+ : base(source)
+ {
+ }
+
+ public PublicTwoFields ToANew()
+ where TTarget : PublicTwoFields
+ {
+ return IntStringIntToTargetValueSourceMapper.CreateNew(this.CreateRootMappingData(default(PublicTwoFields)));
+ }
+
+ public PublicTwoFields Over
+ (
+ PublicTwoFields target
+ )
+ {
+ return IntStringIntToTargetValueSourceMapper.Overwrite(this.CreateRootMappingData(target));
+ }
+
+ public PublicTwoFields OnTo
+ (
+ PublicTwoFields target
+ )
+ {
+ return IntStringIntToTargetValueSourceMapper.Merge(this.CreateRootMappingData(target));
+ }
+
+ private static PublicTwoFields CreateNew
+ (
+ IObjectMappingData, PublicTwoFields> isittvsToIiptfData
+ )
+ {
+ ToTargetValueSource sourceIntStringIntToTargetValueSource;
+ try
+ {
+ sourceIntStringIntToTargetValueSource = isittvsToIiptfData.Source;
+
+ var intIntPublicTwoFields = new PublicTwoFields();
+ intIntPublicTwoFields.Value1 = sourceIntStringIntToTargetValueSource.Value1;
+ // No data sources for Value2
+
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ intIntPublicTwoFields.Value1 = IntStringIntToTargetValueSourceMapper.GetInt1(sourceIntStringIntToTargetValueSource);
+ }
+
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ intIntPublicTwoFields.Value2 = sourceIntStringIntToTargetValueSource.Value.Value2;
+ }
+ }
+
+ return intIntPublicTwoFields;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "ToTargetValueSource",
+ "PublicTwoFields",
+ ex);
+ }
+ }
+
+ private static PublicTwoFields Overwrite
+ (
+ IObjectMappingData, PublicTwoFields> isittvsToIiptfData
+ )
+ {
+ ToTargetValueSource sourceIntStringIntToTargetValueSource;
+ try
+ {
+ sourceIntStringIntToTargetValueSource = isittvsToIiptfData.Source;
+
+ isittvsToIiptfData.Target.Value1 = sourceIntStringIntToTargetValueSource.Value1;
+ // No data sources for Value2
+
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ isittvsToIiptfData.Target.Value1 = IntStringIntToTargetValueSourceMapper.GetInt2(sourceIntStringIntToTargetValueSource);
+ }
+ else
+ {
+ isittvsToIiptfData.Target.Value1 = default(int);
+ }
+
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ isittvsToIiptfData.Target.Value2 = sourceIntStringIntToTargetValueSource.Value.Value2;
+ }
+ else
+ {
+ isittvsToIiptfData.Target.Value2 = default(int);
+ }
+ }
+
+ return isittvsToIiptfData.Target;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ToTargetValueSource",
+ "PublicTwoFields",
+ ex);
+ }
+ }
+
+ private static PublicTwoFields Merge
+ (
+ IObjectMappingData, PublicTwoFields> isittvsToIiptfData
+ )
+ {
+ ToTargetValueSource sourceIntStringIntToTargetValueSource;
+ try
+ {
+ sourceIntStringIntToTargetValueSource = isittvsToIiptfData.Source;
+
+ if (isittvsToIiptfData.Target.Value1 == default(int))
+ {
+ isittvsToIiptfData.Target.Value1 = sourceIntStringIntToTargetValueSource.Value1;
+ }
+
+ // No data sources for Value2
+
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ if (isittvsToIiptfData.Target.Value1 == default(int))
+ {
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ isittvsToIiptfData.Target.Value1 = IntStringIntToTargetValueSourceMapper.GetInt3(sourceIntStringIntToTargetValueSource);
+ }
+ }
+
+ if (isittvsToIiptfData.Target.Value2 == default(int))
+ {
+ if (sourceIntStringIntToTargetValueSource.Value != null)
+ {
+ isittvsToIiptfData.Target.Value2 = sourceIntStringIntToTargetValueSource.Value.Value2;
+ }
+ }
+ }
+
+ return isittvsToIiptfData.Target;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "ToTargetValueSource",
+ "PublicTwoFields",
+ ex);
+ }
+ }
+
+ private static int GetInt1
+ (
+ ToTargetValueSource sourceIntStringIntToTargetValueSource
+ )
+ {
+ int intValue;
+ return int.TryParse(sourceIntStringIntToTargetValueSource.Value.Value1, out intValue)
+ ? intValue
+ : default(int);
+ }
+
+ private static int GetInt2
+ (
+ ToTargetValueSource sourceIntStringIntToTargetValueSource
+ )
+ {
+ int intValue;
+ return int.TryParse(sourceIntStringIntToTargetValueSource.Value.Value1, out intValue)
+ ? intValue
+ : default(int);
+ }
+
+ private static int GetInt3
+ (
+ ToTargetValueSource sourceIntStringIntToTargetValueSource
+ )
+ {
+ int intValue;
+ return int.TryParse(sourceIntStringIntToTargetValueSource.Value.Value1, out intValue)
+ ? intValue
+ : default(int);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Mapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Mapper.cs
new file mode 100644
index 000000000..b029798ae
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/Mapper.cs
@@ -0,0 +1,198 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public static class Mapper
+ {
+ public static AddressAddressPublicTwoFieldsMapper Map
+ (
+ PublicTwoFields source
+ )
+ {
+ return new AddressAddressPublicTwoFieldsMapper(source);
+ }
+
+ public static PublicTwoFields DeepClone
+ (
+ PublicTwoFields source
+ )
+ {
+ return new AddressAddressPublicTwoFieldsMapper(source).ToANew>();
+ }
+
+ public static AddressMapper Map
+ (
+ Address source
+ )
+ {
+ return new AddressMapper(source);
+ }
+
+ public static CharArrayMapper Map
+ (
+ char[] source
+ )
+ {
+ return new CharArrayMapper(source);
+ }
+
+ public static ChildMapper Map
+ (
+ Child source
+ )
+ {
+ return new ChildMapper(source);
+ }
+
+ public static Child DeepClone
+ (
+ Child source
+ )
+ {
+ return new ChildMapper(source).ToANew();
+ }
+
+ public static DateTimeHashSetMapper Map
+ (
+ HashSet source
+ )
+ {
+ return new DateTimeHashSetMapper(source);
+ }
+
+ public static DecimalArrayMapper Map
+ (
+ decimal[] source
+ )
+ {
+ return new DecimalArrayMapper(source);
+ }
+
+ public static IntAddressPublicTwoFieldsMapper Map
+ (
+ PublicTwoFields source
+ )
+ {
+ return new IntAddressPublicTwoFieldsMapper(source);
+ }
+
+ public static IntArrayMapper Map
+ (
+ int[] source
+ )
+ {
+ return new IntArrayMapper(source);
+ }
+
+ public static IntIEnumerableMapper Map
+ (
+ IEnumerable source
+ )
+ {
+ return new IntIEnumerableMapper(source);
+ }
+
+ public static IntStringIntToTargetValueSourceMapper Map
+ (
+ ToTargetValueSource source
+ )
+ {
+ return new IntStringIntToTargetValueSourceMapper(source);
+ }
+
+ public static ProductArrayMapper Map
+ (
+ Product[] source
+ )
+ {
+ return new ProductArrayMapper(source);
+ }
+
+ public static ProductDtoArrayMapper Map
+ (
+ ProductDto[] source
+ )
+ {
+ return new ProductDtoArrayMapper(source);
+ }
+
+ public static ProductDtoListMapper Map
+ (
+ List source
+ )
+ {
+ return new ProductDtoListMapper(source);
+ }
+
+ public static ProductMapper Map
+ (
+ Product source
+ )
+ {
+ return new ProductMapper(source);
+ }
+
+ public static StringCollectionMapper Map
+ (
+ Collection source
+ )
+ {
+ return new StringCollectionMapper(source);
+ }
+
+ public static StringListMapper Map
+ (
+ List source
+ )
+ {
+ return new StringListMapper(source);
+ }
+
+ public static StringMapper Map
+ (
+ string source
+ )
+ {
+ return new StringMapper(source);
+ }
+
+ public static StringPublicFieldMapper Map
+ (
+ PublicField source
+ )
+ {
+ return new StringPublicFieldMapper(source);
+ }
+
+ public static StringPublicPropertyMapper Map
+ (
+ PublicProperty source
+ )
+ {
+ return new StringPublicPropertyMapper(source);
+ }
+
+ public static StringStringDictionaryMapper Map
+ (
+ Dictionary source
+ )
+ {
+ return new StringStringDictionaryMapper(source);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductArrayMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductArrayMapper.cs
new file mode 100644
index 000000000..faba24256
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductArrayMapper.cs
@@ -0,0 +1,291 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class ProductArrayMapper : MappingExecutionContextBase
+ {
+ public ProductArrayMapper
+ (
+ Product[] source
+ )
+ : base(source)
+ {
+ }
+
+ public IEnumerable OnTo
+ (
+ IEnumerable target
+ )
+ {
+ return ProductArrayMapper.Merge(this.CreateRootMappingData(target));
+ }
+
+ private static IEnumerable Merge
+ (
+ IObjectMappingData> paToPieData
+ )
+ {
+ try
+ {
+ var collectionData = CollectionData.Create(paToPieData.Source, paToPieData.Target, p => p.ProductId);
+ collectionData.Intersection.ForEach(
+ (existingSourceProduct, existingTargetProduct, idx) => ProductArrayMapper.GetProduct1(existingSourceProduct, existingTargetProduct));
+ var sourceProductIEnumerable = collectionData.NewSourceItems;
+ var targetProductICollection = ProductArrayMapper.GetProductICollection(paToPieData);
+ var i = 0;
+ var enumerator = sourceProductIEnumerable.GetEnumerator();
+ try
+ {
+ while (true)
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+
+ targetProductICollection.Add(ProductArrayMapper.GetProduct2(enumerator));
+ ++i;
+ }
+ }
+ finally
+ {
+ enumerator.Dispose();
+ }
+
+ return targetProductICollection;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[]",
+ "IEnumerable",
+ ex);
+ }
+ }
+
+ private static Product GetProduct1
+ (
+ Product existingSourceProduct,
+ Product existingTargetProduct
+ )
+ {
+ try
+ {
+ if (existingSourceProduct == null)
+ {
+ return null;
+ }
+
+ var sourceMegaProduct = existingSourceProduct as MegaProduct;
+
+ if ((sourceMegaProduct != null) && ((existingTargetProduct == null) || (existingTargetProduct is MegaProduct)))
+ {
+ return ProductArrayMapper.GetMegaProduct1(existingTargetProduct, sourceMegaProduct);
+ }
+
+ if (existingTargetProduct is MegaProduct)
+ {
+ return ProductArrayMapper.GetMegaProduct2(existingTargetProduct, existingSourceProduct);
+ }
+ var product = existingTargetProduct ?? new Product();
+
+ if (product.ProductId == null)
+ {
+ product.ProductId = existingSourceProduct.ProductId;
+ }
+
+ if (product.Price == default(double))
+ {
+ product.Price = existingSourceProduct.Price;
+ }
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[][i]",
+ "IEnumerable[i]",
+ ex);
+ }
+ }
+
+ private static MegaProduct GetMegaProduct1
+ (
+ Product existingTargetProduct,
+ MegaProduct sourceMegaProduct
+ )
+ {
+ try
+ {
+ var megaProduct = ((MegaProduct)existingTargetProduct) ?? new MegaProduct();
+
+ if (megaProduct.HowMega == default(decimal))
+ {
+ megaProduct.HowMega = sourceMegaProduct.HowMega;
+ }
+
+ if (megaProduct.ProductId == null)
+ {
+ megaProduct.ProductId = sourceMegaProduct.ProductId;
+ }
+
+ if (megaProduct.Price == default(double))
+ {
+ megaProduct.Price = sourceMegaProduct.Price;
+ }
+
+ return megaProduct;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[][i]",
+ "IEnumerable[i]",
+ ex);
+ }
+ }
+
+ private static MegaProduct GetMegaProduct2
+ (
+ Product existingTargetProduct,
+ Product existingSourceProduct
+ )
+ {
+ try
+ {
+ var megaProduct = ((MegaProduct)existingTargetProduct) ?? new MegaProduct();
+ // No data sources for HowMega
+
+ if (megaProduct.ProductId == null)
+ {
+ megaProduct.ProductId = existingSourceProduct.ProductId;
+ }
+
+ if (megaProduct.Price == default(double))
+ {
+ megaProduct.Price = existingSourceProduct.Price;
+ }
+
+ return megaProduct;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[][i]",
+ "IEnumerable[i]",
+ ex);
+ }
+ }
+
+ private static ICollection GetProductICollection
+ (
+ IObjectMappingData> paToPieData
+ )
+ {
+ ICollection collection;
+ return ((collection = paToPieData.Target as ICollection) != null)
+ ? collection.IsReadOnly ? new List(paToPieData.Target) : collection
+ : new List(paToPieData.Target);
+ }
+
+ private static Product GetProduct2
+ (
+ IEnumerator enumerator
+ )
+ {
+ try
+ {
+ if (enumerator.Current == null)
+ {
+ return null;
+ }
+
+ var sourceMegaProduct = enumerator.Current as MegaProduct;
+
+ if (sourceMegaProduct != null)
+ {
+ return ProductArrayMapper.GetMegaProduct(sourceMegaProduct);
+ }
+ var product = new Product();
+
+ if (product.ProductId == null)
+ {
+ product.ProductId = enumerator.Current.ProductId;
+ }
+
+ if (product.Price == default(double))
+ {
+ product.Price = enumerator.Current.Price;
+ }
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[][i]",
+ "IEnumerable[i]",
+ ex);
+ }
+ }
+
+ private static MegaProduct GetMegaProduct
+ (
+ MegaProduct sourceMegaProduct
+ )
+ {
+ try
+ {
+ var megaProduct = new MegaProduct();
+
+ if (megaProduct.HowMega == default(decimal))
+ {
+ megaProduct.HowMega = sourceMegaProduct.HowMega;
+ }
+
+ if (megaProduct.ProductId == null)
+ {
+ megaProduct.ProductId = sourceMegaProduct.ProductId;
+ }
+
+ if (megaProduct.Price == default(double))
+ {
+ megaProduct.Price = sourceMegaProduct.Price;
+ }
+
+ return megaProduct;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Merge",
+ "Product[][i]",
+ "IEnumerable[i]",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoArrayMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoArrayMapper.cs
new file mode 100644
index 000000000..b6808fb20
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoArrayMapper.cs
@@ -0,0 +1,236 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class ProductDtoArrayMapper : MappingExecutionContextBase
+ {
+ public ProductDtoArrayMapper
+ (
+ ProductDto[] source
+ )
+ : base(source)
+ {
+ }
+
+ public ReadOnlyCollection Over
+ (
+ ReadOnlyCollection target
+ )
+ {
+ return ProductDtoArrayMapper.Overwrite(this.CreateRootMappingData(target));
+ }
+
+ private static ReadOnlyCollection Overwrite
+ (
+ IObjectMappingData> pdaToProcData
+ )
+ {
+ try
+ {
+ var collectionData = CollectionData.Create(
+ pdaToProcData.Source,
+ pdaToProcData.Target,
+ pd => pd.ProductId,
+ p => p.ProductId);
+ collectionData.Intersection.ForEach(
+ (existingProductDto, existingProduct, idx) => ProductDtoArrayMapper.GetProduct1(existingProductDto, existingProduct));
+ var productDtoIEnumerable = collectionData.NewSourceItems;
+ var productList = new List(pdaToProcData.Target);
+ collectionData.AbsentTargetItems.ForEach(p => productList.Remove(p));
+ var i = 0;
+ var enumerator = productDtoIEnumerable.GetEnumerator();
+ try
+ {
+ while (true)
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+
+ productList.Add(ProductDtoArrayMapper.GetProduct1(enumerator));
+ ++i;
+ }
+ }
+ finally
+ {
+ enumerator.Dispose();
+ }
+
+ return productList.AsReadOnly();
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[]",
+ "ReadOnlyCollection",
+ ex);
+ }
+ }
+
+ private static Product GetProduct1
+ (
+ ProductDto existingProductDto,
+ Product existingProduct
+ )
+ {
+ try
+ {
+ if (existingProductDto == null)
+ {
+ return null;
+ }
+
+ var sourceProductDtoMega = existingProductDto as ProductDtoMega;
+
+ if (sourceProductDtoMega != null)
+ {
+ return ProductDtoArrayMapper.GetProduct2(existingProduct, sourceProductDtoMega);
+ }
+
+ if (existingProduct is MegaProduct)
+ {
+ return ProductDtoArrayMapper.GetMegaProduct(existingProduct, existingProductDto);
+ }
+ var product = existingProduct ?? new Product();
+ product.ProductId = existingProductDto.ProductId;
+ product.Price = (double)existingProductDto.Price;
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[][i]",
+ "ReadOnlyCollection[i]",
+ ex);
+ }
+ }
+
+ private static Product GetProduct2
+ (
+ Product existingProduct,
+ ProductDtoMega sourceProductDtoMega
+ )
+ {
+ try
+ {
+ var product = existingProduct ?? new Product();
+ product.ProductId = sourceProductDtoMega.ProductId;
+ product.Price = (double)sourceProductDtoMega.Price;
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[][i]",
+ "ReadOnlyCollection[i]",
+ ex);
+ }
+ }
+
+ private static MegaProduct GetMegaProduct
+ (
+ Product existingProduct,
+ ProductDto existingProductDto
+ )
+ {
+ try
+ {
+ var megaProduct = ((MegaProduct)existingProduct) ?? new MegaProduct();
+ // No data sources for HowMega
+ megaProduct.ProductId = existingProductDto.ProductId;
+ megaProduct.Price = (double)existingProductDto.Price;
+
+ return megaProduct;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[][i]",
+ "ReadOnlyCollection[i]",
+ ex);
+ }
+ }
+
+ private static Product GetProduct1
+ (
+ IEnumerator enumerator
+ )
+ {
+ try
+ {
+ if (enumerator.Current == null)
+ {
+ return null;
+ }
+
+ var sourceProductDtoMega = enumerator.Current as ProductDtoMega;
+
+ if (sourceProductDtoMega != null)
+ {
+ return ProductDtoArrayMapper.GetProduct2(sourceProductDtoMega);
+ }
+ var product = new Product();
+ product.ProductId = enumerator.Current.ProductId;
+ product.Price = (double)enumerator.Current.Price;
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[][i]",
+ "ReadOnlyCollection[i]",
+ ex);
+ }
+ }
+
+ private static Product GetProduct2
+ (
+ ProductDtoMega sourceProductDtoMega
+ )
+ {
+ try
+ {
+ var product = new Product();
+ product.ProductId = sourceProductDtoMega.ProductId;
+ product.Price = (double)sourceProductDtoMega.Price;
+
+ return product;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "ProductDto[][i]",
+ "ReadOnlyCollection[i]",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoListMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoListMapper.cs
new file mode 100644
index 000000000..e073f7878
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductDtoListMapper.cs
@@ -0,0 +1,129 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class ProductDtoListMapper : MappingExecutionContextBase>
+ {
+ public ProductDtoListMapper
+ (
+ List source
+ )
+ : base(source)
+ {
+ }
+
+ public IList ToANew()
+ where TTarget : IList
+ {
+ return ProductDtoListMapper.CreateNew(this.CreateRootMappingData(default(IList)));
+ }
+
+ private static IList CreateNew
+ (
+ IObjectMappingData, IList> pdlToPdilData
+ )
+ {
+ try
+ {
+ var sourceProductDtoList = pdlToPdilData.Source;
+ var targetProductDtoList = new List(sourceProductDtoList.Count);
+ var i = 0;
+ while (true)
+ {
+ if (i == sourceProductDtoList.Count)
+ {
+ break;
+ }
+
+ var sourceProductDto = sourceProductDtoList[i];
+ targetProductDtoList.Add(ProductDtoListMapper.GetProductDto(sourceProductDto));
+ ++i;
+ }
+
+ return targetProductDtoList;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "List",
+ "IList",
+ ex);
+ }
+ }
+
+ private static ProductDto GetProductDto
+ (
+ ProductDto sourceProductDto
+ )
+ {
+ try
+ {
+ if (sourceProductDto == null)
+ {
+ return null;
+ }
+
+ var sourceProductDtoMega = sourceProductDto as ProductDtoMega;
+
+ if (sourceProductDtoMega != null)
+ {
+ return ProductDtoListMapper.GetProductDtoMega(sourceProductDtoMega);
+ }
+ var productDto = new ProductDto();
+ productDto.ProductId = sourceProductDto.ProductId;
+ productDto.Price = sourceProductDto.Price;
+
+ return productDto;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "List[i]",
+ "IList[i]",
+ ex);
+ }
+ }
+
+ private static ProductDtoMega GetProductDtoMega
+ (
+ ProductDtoMega sourceProductDtoMega
+ )
+ {
+ try
+ {
+ var productDtoMega = new ProductDtoMega();
+ productDtoMega.HowMega = sourceProductDtoMega.HowMega;
+ productDtoMega.ProductId = sourceProductDtoMega.ProductId;
+ productDtoMega.Price = sourceProductDtoMega.Price;
+
+ return productDtoMega;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "List[i]",
+ "IList[i]",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductMapper.cs
new file mode 100644
index 000000000..612590fb8
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/ProductMapper.cs
@@ -0,0 +1,106 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+using AgileObjects.NetStandardPolyfills;
+using AgileObjects.ReadableExpressions;
+using AgileObjects.ReadableExpressions.Extensions;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class ProductMapper : MappingExecutionContextBase
+ {
+ public ProductMapper
+ (
+ Product source
+ )
+ : base(source)
+ {
+ }
+
+ public TTarget ToANew()
+ {
+ if (typeof(TTarget).IsAssignableTo(typeof(ProductDto)))
+ {
+ return (TTarget)((object)ProductMapper.CreateNew(this.CreateRootMappingData(default(ProductDto))));
+ }
+
+ throw new NotSupportedException(
+ "Unable to perform a 'CreateNew' mapping from source type 'Product' to target type '" + typeof(TTarget).GetFriendlyName(null) + "'");
+ }
+
+ private static ProductDto CreateNew
+ (
+ IObjectMappingData pToPdData
+ )
+ {
+ Product sourceProduct;
+ try
+ {
+ sourceProduct = pToPdData.Source;
+
+ var sourceMegaProduct = sourceProduct as MegaProduct;
+
+ if (sourceMegaProduct != null)
+ {
+ return ProductMapper.GetProductDtoMega(sourceMegaProduct);
+ }
+ var productDto = new ProductDto();
+ productDto.ProductId = sourceProduct.ProductId;
+ productDto.Price = ((sourceProduct.Price >= ((double)-79228162514264337593543950335m)) &&
+ (sourceProduct.Price <= ((double)79228162514264337593543950335m)))
+ ? (decimal)sourceProduct.Price
+ : default(decimal);
+
+ return productDto;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "Product",
+ "ProductDto",
+ ex);
+ }
+ }
+
+ private static ProductDtoMega GetProductDtoMega
+ (
+ MegaProduct sourceMegaProduct
+ )
+ {
+ try
+ {
+ var productDtoMega = new ProductDtoMega();
+ productDtoMega.HowMega = sourceMegaProduct.HowMega.ToString();
+ productDtoMega.ProductId = sourceMegaProduct.ProductId;
+ productDtoMega.Price = ((sourceMegaProduct.Price >= ((double)-79228162514264337593543950335m)) &&
+ (sourceMegaProduct.Price <= ((double)79228162514264337593543950335m)))
+ ? (decimal)sourceMegaProduct.Price
+ : default(decimal);
+
+ return productDtoMega;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "MegaProduct",
+ "ProductDtoMega",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringCollectionMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringCollectionMapper.cs
new file mode 100644
index 000000000..59b82670e
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringCollectionMapper.cs
@@ -0,0 +1,63 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringCollectionMapper : MappingExecutionContextBase>
+ {
+ public StringCollectionMapper
+ (
+ Collection source
+ )
+ : base(source)
+ {
+ }
+
+ public List Over
+ (
+ List target
+ )
+ {
+ return StringCollectionMapper.Overwrite(this.CreateRootMappingData(target));
+ }
+
+ private static List Overwrite
+ (
+ IObjectMappingData, List> scToSlData
+ )
+ {
+ try
+ {
+ var sourceStringCollection = scToSlData.Source;
+ var targetStringList = scToSlData.Target;
+ targetStringList.Clear();
+ targetStringList.AddRange(sourceStringCollection);
+
+ return targetStringList;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "Overwrite",
+ "Collection",
+ "List",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringListMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringListMapper.cs
new file mode 100644
index 000000000..f210f24f2
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringListMapper.cs
@@ -0,0 +1,80 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringListMapper : MappingExecutionContextBase>
+ {
+ public StringListMapper
+ (
+ List source
+ )
+ : base(source)
+ {
+ }
+
+ public Collection ToANew()
+ where TTarget : Collection>
+ {
+ return StringListMapper.CreateNew(this.CreateRootMappingData(default(Collection)));
+ }
+
+ private static Collection CreateNew
+ (
+ IObjectMappingData, Collection> slToNbcData
+ )
+ {
+ try
+ {
+ var stringList = slToNbcData.Source;
+ var nullableByteCollection = new Collection();
+ var i = 0;
+ while (true)
+ {
+ if (i == stringList.Count)
+ {
+ break;
+ }
+
+ nullableByteCollection.Add(StringListMapper.GetNullableByte(stringList, i));
+ ++i;
+ }
+
+ return nullableByteCollection;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "List",
+ "Collection",
+ ex);
+ }
+ }
+
+ private static byte? GetNullableByte
+ (
+ List stringList,
+ int i
+ )
+ {
+ byte byteValue;
+ return byte.TryParse(stringList[i], out byteValue) ? (byte?)byteValue : null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringMapper.cs
new file mode 100644
index 000000000..92e74fdf4
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringMapper.cs
@@ -0,0 +1,130 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+using AgileObjects.ReadableExpressions;
+using AgileObjects.ReadableExpressions.Extensions;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringMapper : MappingExecutionContextBase
+ {
+ public StringMapper
+ (
+ string source
+ )
+ : base(source)
+ {
+ }
+
+ public TTarget ToANew()
+ {
+ if (typeof(TTarget) == typeof(Title))
+ {
+ return (TTarget)((object)StringMapper.CreateNew(this.CreateRootMappingData(default(Title))));
+ }
+
+ throw new NotSupportedException(
+ "Unable to perform a 'CreateNew' mapping from source type 'string' to target type '" + typeof(TTarget).GetFriendlyName(null) + "'");
+ }
+
+ private static Title CreateNew
+ (
+ IObjectMappingData sToTData
+ )
+ {
+ try
+ {
+ if (sToTData.Source == null)
+ {
+ return default(Title);
+ }
+
+ switch (sToTData.Source.ToUpperInvariant())
+ {
+ case "0":
+ case "UNKNOWN":
+ return Title.Unknown;
+
+ case "1":
+ case "MR":
+ return Title.Mr;
+
+ case "2":
+ case "MASTER":
+ return Title.Master;
+
+ case "3":
+ case "MS":
+ return Title.Ms;
+
+ case "4":
+ case "MISS":
+ return Title.Miss;
+
+ case "5":
+ case "MRS":
+ return Title.Mrs;
+
+ case "6":
+ case "DR":
+ return Title.Dr;
+
+ case "7":
+ case "HON":
+ return Title.Hon;
+
+ case "8":
+ case "DUKE":
+ return Title.Duke;
+
+ case "9":
+ case "COUNT":
+ return Title.Count;
+
+ case "10":
+ case "EARL":
+ return Title.Earl;
+
+ case "11":
+ case "VISCOUNT":
+ return Title.Viscount;
+
+ case "12":
+ case "LORD":
+ return Title.Lord;
+
+ case "13":
+ case "LADY":
+ return Title.Lady;
+
+ case "14":
+ case "OTHER":
+ return Title.Other;
+ }
+
+ return default(Title);
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "string",
+ "Title",
+ ex);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicFieldMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicFieldMapper.cs
new file mode 100644
index 000000000..f3b5eb6c2
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicFieldMapper.cs
@@ -0,0 +1,102 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+using AgileObjects.NetStandardPolyfills;
+using AgileObjects.ReadableExpressions;
+using AgileObjects.ReadableExpressions.Extensions;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringPublicFieldMapper : MappingExecutionContextBase>
+ {
+ public StringPublicFieldMapper
+ (
+ PublicField source
+ )
+ : base(source)
+ {
+ }
+
+ public TTarget ToANew()
+ {
+ if (typeof(TTarget).IsAssignableTo(typeof(PublicField)))
+ {
+ return (TTarget)((object)StringPublicFieldMapper.CreateNew(this.CreateRootMappingData(default(PublicField))));
+ }
+
+ if (typeof(TTarget).IsAssignableTo(typeof(PublicProperty)))
+ {
+ return (TTarget)((object)StringPublicFieldMapper.CreateNew(this.CreateRootMappingData(default(PublicProperty))));
+ }
+
+ throw new NotSupportedException(
+ "Unable to perform a 'CreateNew' mapping from source type 'PublicField' to target type '" + typeof(TTarget).GetFriendlyName(null) + "'");
+ }
+
+ private static PublicField CreateNew
+ (
+ IObjectMappingData, PublicField> spfToIpfData
+ )
+ {
+ try
+ {
+ var intPublicField = new PublicField();
+ intPublicField.Value = StringPublicFieldMapper.GetInt(spfToIpfData);
+
+ return intPublicField;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicField",
+ "PublicField",
+ ex);
+ }
+ }
+
+ private static PublicProperty CreateNew
+ (
+ IObjectMappingData, PublicProperty> spfToSppData
+ )
+ {
+ try
+ {
+ var stringPublicProperty = new PublicProperty();
+ stringPublicProperty.Value = spfToSppData.Source.Value;
+
+ return stringPublicProperty;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicField",
+ "PublicProperty",
+ ex);
+ }
+ }
+
+ private static int GetInt
+ (
+ IObjectMappingData, PublicField> spfToIpfData
+ )
+ {
+ int intValue;
+ return int.TryParse(spfToIpfData.Source.Value, out intValue) ? intValue : default(int);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicPropertyMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicPropertyMapper.cs
new file mode 100644
index 000000000..db265810d
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringPublicPropertyMapper.cs
@@ -0,0 +1,67 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringPublicPropertyMapper : MappingExecutionContextBase>
+ {
+ public StringPublicPropertyMapper
+ (
+ PublicProperty source
+ )
+ : base(source)
+ {
+ }
+
+ public PublicField ToANew()
+ where TTarget : PublicField
+ {
+ return StringPublicPropertyMapper.CreateNew(this.CreateRootMappingData(default(PublicField)));
+ }
+
+ private static PublicField CreateNew
+ (
+ IObjectMappingData, PublicField> sppToIpfData
+ )
+ {
+ try
+ {
+ var intPublicField = new PublicField();
+ intPublicField.Value = StringPublicPropertyMapper.GetInt(sppToIpfData);
+
+ return intPublicField;
+ }
+ catch (Exception ex)
+ {
+ throw MappingException.For(
+ "CreateNew",
+ "PublicProperty",
+ "PublicField",
+ ex);
+ }
+ }
+
+ private static int GetInt
+ (
+ IObjectMappingData, PublicField> sppToIpfData
+ )
+ {
+ int intValue;
+ return int.TryParse(sppToIpfData.Source.Value, out intValue) ? intValue : default(int);
+ }
+ }
+}
\ No newline at end of file
diff --git a/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringStringDictionaryMapper.cs b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringStringDictionaryMapper.cs
new file mode 100644
index 000000000..a7ce1675a
--- /dev/null
+++ b/AgileMapper.Buildable.UnitTests.NetStandard2.Mappers/Mappers/StringStringDictionaryMapper.cs
@@ -0,0 +1,119 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by AgileObjects.AgileMapper.Buildable.
+// Runtime Version: 0.1.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Linq;
+using AgileObjects.AgileMapper;
+using AgileObjects.AgileMapper.Extensions;
+using AgileObjects.AgileMapper.Extensions.Internal;
+using AgileObjects.AgileMapper.ObjectPopulation;
+using AgileObjects.AgileMapper.UnitTests.Common.TestClasses;
+using AgileObjects.ReadableExpressions;
+using AgileObjects.ReadableExpressions.Extensions;
+
+namespace AgileObjects.AgileMapper.Buildable.UnitTests.Mappers
+{
+ [GeneratedCode("AgileObjects.AgileMapper.Buildable", "0.1.0.0")]
+ public class StringStringDictionaryMapper : MappingExecutionContextBase>
+ {
+ public StringStringDictionaryMapper
+ (
+ Dictionary