diff --git a/.idea/.idea.ExpressMapper/.idea/modules.xml b/.idea/.idea.ExpressMapper/.idea/modules.xml
new file mode 100644
index 0000000..66a9604
--- /dev/null
+++ b/.idea/.idea.ExpressMapper/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ExpressMapper/.idea/vcs.xml b/.idea/.idea.ExpressMapper/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/.idea.ExpressMapper/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ExpressMapper/.idea/workspace.xml b/.idea/.idea.ExpressMapper/.idea/workspace.xml
new file mode 100644
index 0000000..b4a3b92
--- /dev/null
+++ b/.idea/.idea.ExpressMapper/.idea/workspace.xml
@@ -0,0 +1,1858 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ typeof(Mapper
+ Mapper
+ Recur
+ Map
+ GetMapExpressions
+ MapProperty
+ recur
+ InitializeRecursiveMappings
+ RecursiveExpressionResult
+ BaseTy
+ RegisterInterna
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1484511416080
+
+
+ 1484511416080
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.ExpressMapper/riderModule.iml b/.idea/.idea.ExpressMapper/riderModule.iml
new file mode 100644
index 0000000..4243fce
--- /dev/null
+++ b/.idea/.idea.ExpressMapper/riderModule.iml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ExpressMapper NET40/ExpressMapper NET40.csproj b/ExpressMapper NET40/ExpressMapper NET40.csproj
index 6b06129..b245bef 100644
--- a/ExpressMapper NET40/ExpressMapper NET40.csproj
+++ b/ExpressMapper NET40/ExpressMapper NET40.csproj
@@ -36,7 +36,8 @@
true
- Expressmapper.snk
+
+
false
@@ -51,49 +52,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ -->
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/Models/BaseControl.cs b/ExpressMapper.Tests.Model/Models/BaseControl.cs
new file mode 100644
index 0000000..0bf0709
--- /dev/null
+++ b/ExpressMapper.Tests.Model/Models/BaseControl.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace ExpressMapper.Tests.Model.Models
+{
+ public class BaseControl
+ {
+ public Guid Id { get; set; }
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+ }
+}
diff --git a/ExpressMapper.Tests.Model/Models/ComboBox.cs b/ExpressMapper.Tests.Model/Models/ComboBox.cs
new file mode 100644
index 0000000..3a66b7a
--- /dev/null
+++ b/ExpressMapper.Tests.Model/Models/ComboBox.cs
@@ -0,0 +1,8 @@
+namespace ExpressMapper.Tests.Model.Models
+{
+ public class ComboBox : BaseControl
+ {
+ public int NumberOfElements { get; set; }
+ public string GeneralName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/Models/Gui.cs b/ExpressMapper.Tests.Model/Models/Gui.cs
new file mode 100644
index 0000000..302a79a
--- /dev/null
+++ b/ExpressMapper.Tests.Model/Models/Gui.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+
+namespace ExpressMapper.Tests.Model.Models
+{
+ public class Gui
+ {
+ public IList Controls { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/Models/Organization.cs b/ExpressMapper.Tests.Model/Models/Organization.cs
index d054362..1818706 100644
--- a/ExpressMapper.Tests.Model/Models/Organization.cs
+++ b/ExpressMapper.Tests.Model/Models/Organization.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace ExpressMapper.Tests.Model.Models
+namespace ExpressMapper.Tests.Model.Models
{
public class Organization : Contact
{
diff --git a/ExpressMapper.Tests.Model/Models/TextBox.cs b/ExpressMapper.Tests.Model/Models/TextBox.cs
new file mode 100644
index 0000000..3e809bf
--- /dev/null
+++ b/ExpressMapper.Tests.Model/Models/TextBox.cs
@@ -0,0 +1,7 @@
+namespace ExpressMapper.Tests.Model.Models
+{
+ public class TextBox : BaseControl
+ {
+ public string Text { get; set; }
+ }
+}
diff --git a/ExpressMapper.Tests.Model/Models/UserInterface.cs b/ExpressMapper.Tests.Model/Models/UserInterface.cs
new file mode 100644
index 0000000..1cd8eb6
--- /dev/null
+++ b/ExpressMapper.Tests.Model/Models/UserInterface.cs
@@ -0,0 +1,7 @@
+namespace ExpressMapper.Tests.Model.Models
+{
+ public class UserInterface
+ {
+ public BaseControl Control { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/ViewModels/BaseControlViewModel.cs b/ExpressMapper.Tests.Model/ViewModels/BaseControlViewModel.cs
new file mode 100644
index 0000000..5ef9be7
--- /dev/null
+++ b/ExpressMapper.Tests.Model/ViewModels/BaseControlViewModel.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace ExpressMapper.Tests.Model.ViewModels
+{
+ public class BaseControlViewModel
+ {
+ public Guid id_ctrl { get; set; }
+ public string name_ctrl { get; set; }
+
+ public string Description { get; set; }
+ }
+}
diff --git a/ExpressMapper.Tests.Model/ViewModels/ComboBoxViewModel.cs b/ExpressMapper.Tests.Model/ViewModels/ComboBoxViewModel.cs
new file mode 100644
index 0000000..47f3ce8
--- /dev/null
+++ b/ExpressMapper.Tests.Model/ViewModels/ComboBoxViewModel.cs
@@ -0,0 +1,8 @@
+namespace ExpressMapper.Tests.Model.ViewModels
+{
+ public class ComboBoxViewModel : BaseControlViewModel
+ {
+ public int AmountOfElements { get; set; }
+ public string GeneralName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/ViewModels/GuiViewModel.cs b/ExpressMapper.Tests.Model/ViewModels/GuiViewModel.cs
new file mode 100644
index 0000000..f340631
--- /dev/null
+++ b/ExpressMapper.Tests.Model/ViewModels/GuiViewModel.cs
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+
+namespace ExpressMapper.Tests.Model.ViewModels
+{
+ public class GuiViewModel
+ {
+ public IEnumerable ControlViewModels { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.Tests.Model/ViewModels/TextBoxViewModel.cs b/ExpressMapper.Tests.Model/ViewModels/TextBoxViewModel.cs
new file mode 100644
index 0000000..5997fc1
--- /dev/null
+++ b/ExpressMapper.Tests.Model/ViewModels/TextBoxViewModel.cs
@@ -0,0 +1,7 @@
+namespace ExpressMapper.Tests.Model.ViewModels
+{
+ public class TextBoxViewModel : BaseControlViewModel
+ {
+ public string Text { get; set; }
+ }
+}
diff --git a/ExpressMapper.Tests.Model/ViewModels/UserInterfaceViewModel.cs b/ExpressMapper.Tests.Model/ViewModels/UserInterfaceViewModel.cs
new file mode 100644
index 0000000..ff08306
--- /dev/null
+++ b/ExpressMapper.Tests.Model/ViewModels/UserInterfaceViewModel.cs
@@ -0,0 +1,7 @@
+namespace ExpressMapper.Tests.Model.ViewModels
+{
+ public class UserInterfaceViewModel
+ {
+ public BaseControlViewModel ControlViewModel { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/ExpressMapper.sln b/ExpressMapper.sln
index 4a46e73..68424df 100644
--- a/ExpressMapper.sln
+++ b/ExpressMapper.sln
@@ -27,7 +27,16 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ExpressMapper.Tests NETCORE
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpressMapper NET45", "ExpressMapper NET45\ExpressMapper NET45.csproj", "{5E211506-6D4E-4CD8-B454-D02672CF948A}"
EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Expressmapper.Shared", "Expressmapper.Shared\Expressmapper.Shared.shproj", "{75C7DD14-FD53-462D-9FB3-AA5E31380B55}"
+EndProject
Global
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ Expressmapper.Shared\Expressmapper.Shared.projitems*{0b7a5bdb-6d9f-4a9e-a35d-081d0424d577}*SharedItemsImports = 4
+ Expressmapper.Shared\Expressmapper.Shared.projitems*{5e211506-6d4e-4cd8-b454-d02672cf948a}*SharedItemsImports = 4
+ Expressmapper.Shared\Expressmapper.Shared.projitems*{75c7dd14-fd53-462d-9fb3-aa5e31380b55}*SharedItemsImports = 13
+ Expressmapper.Shared\Expressmapper.Shared.projitems*{909366ad-7ff2-4197-a340-cc858c4b8ad1}*SharedItemsImports = 4
+ Expressmapper.Shared\Expressmapper.Shared.projitems*{e701191e-bf2e-41b8-a4f0-3d8954e3dd58}*SharedItemsImports = 4
+ EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
diff --git a/ExpressMapper NET40/CollectionTypes.cs b/Expressmapper.Shared/CollectionTypes.cs
similarity index 100%
rename from ExpressMapper NET40/CollectionTypes.cs
rename to Expressmapper.Shared/CollectionTypes.cs
diff --git a/ExpressMapper NET40/CompilationTypes.cs b/Expressmapper.Shared/CompilationTypes.cs
similarity index 100%
rename from ExpressMapper NET40/CompilationTypes.cs
rename to Expressmapper.Shared/CompilationTypes.cs
diff --git a/ExpressMapper NET40/Constants.cs b/Expressmapper.Shared/Constants.cs
similarity index 100%
rename from ExpressMapper NET40/Constants.cs
rename to Expressmapper.Shared/Constants.cs
diff --git a/ExpressMapper NET40/DefaultMappingContext.cs b/Expressmapper.Shared/DefaultMappingContext.cs
similarity index 100%
rename from ExpressMapper NET40/DefaultMappingContext.cs
rename to Expressmapper.Shared/DefaultMappingContext.cs
diff --git a/ExpressMapper NET40/DelegateCustomTypeMapper.cs b/Expressmapper.Shared/DelegateCustomTypeMapper.cs
similarity index 95%
rename from ExpressMapper NET40/DelegateCustomTypeMapper.cs
rename to Expressmapper.Shared/DelegateCustomTypeMapper.cs
index 6c455dd..5aa3ff7 100644
--- a/ExpressMapper NET40/DelegateCustomTypeMapper.cs
+++ b/Expressmapper.Shared/DelegateCustomTypeMapper.cs
@@ -1,23 +1,23 @@
-using System;
-
-namespace ExpressMapper
-{
- internal class DelegateCustomTypeMapper : ICustomTypeMapper
- {
- private readonly Func _mapFunc;
-
- public DelegateCustomTypeMapper(Func mapFunc)
- {
- _mapFunc = mapFunc;
- }
-
- public TN Map(IMappingContext context)
- {
- if (context == null)
- {
- throw new ArgumentNullException("context");
- }
- return _mapFunc(context.Source);
- }
- }
-}
+using System;
+
+namespace ExpressMapper
+{
+ internal class DelegateCustomTypeMapper : ICustomTypeMapper
+ {
+ private readonly Func _mapFunc;
+
+ public DelegateCustomTypeMapper(Func mapFunc)
+ {
+ _mapFunc = mapFunc;
+ }
+
+ public TN Map(IMappingContext context)
+ {
+ if (context == null)
+ {
+ throw new ArgumentNullException("context");
+ }
+ return _mapFunc(context.Source);
+ }
+ }
+}
diff --git a/ExpressMapper NET40/DestinationMappingService.cs b/Expressmapper.Shared/DestinationMappingService.cs
similarity index 99%
rename from ExpressMapper NET40/DestinationMappingService.cs
rename to Expressmapper.Shared/DestinationMappingService.cs
index c8dd56d..360fc92 100644
--- a/ExpressMapper NET40/DestinationMappingService.cs
+++ b/Expressmapper.Shared/DestinationMappingService.cs
@@ -245,7 +245,7 @@ private BlockExpression MapCollectionNotCountEquals(Type tCol, Type tnCol, Expre
var closedEnumeratorDestType = typeof(IEnumerator<>).MakeGenericType(destType);
var closedEnumerableDestType = GenericEnumerableType.MakeGenericType(destType);
var enumeratorDest = Expression.Variable(closedEnumeratorDestType,
- $"{Guid.NewGuid().ToString("N")}EnumDst");
+ $"{Guid.NewGuid():N}EnumDst");
var assignToEnumDest = Expression.Assign(enumeratorDest,
Expression.Call(destVariable, closedEnumerableDestType.GetInfo().GetMethod("GetEnumerator")));
var doMoveNextDest = Expression.Call(enumeratorDest, typeof(IEnumerator).GetInfo().GetMethod("MoveNext"));
diff --git a/ExpressMapper NET40/DestinationTypeMapper.cs b/Expressmapper.Shared/DestinationTypeMapper.cs
similarity index 100%
rename from ExpressMapper NET40/DestinationTypeMapper.cs
rename to Expressmapper.Shared/DestinationTypeMapper.cs
diff --git a/Expressmapper.Shared/Expressmapper.Shared.projitems b/Expressmapper.Shared/Expressmapper.Shared.projitems
new file mode 100644
index 0000000..dc225d7
--- /dev/null
+++ b/Expressmapper.Shared/Expressmapper.Shared.projitems
@@ -0,0 +1,51 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ 75c7dd14-fd53-462d-9fb3-aa5e31380b55
+
+
+ Expressmapper.Shared
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+
+ Code
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Expressmapper.Shared/Expressmapper.Shared.shproj b/Expressmapper.Shared/Expressmapper.Shared.shproj
new file mode 100644
index 0000000..a94bd46
--- /dev/null
+++ b/Expressmapper.Shared/Expressmapper.Shared.shproj
@@ -0,0 +1,13 @@
+
+
+
+ 75c7dd14-fd53-462d-9fb3-aa5e31380b55
+ 14.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ExpressMapper NET40/ExpressmapperException.cs b/Expressmapper.Shared/ExpressmapperException.cs
similarity index 100%
rename from ExpressMapper NET40/ExpressmapperException.cs
rename to Expressmapper.Shared/ExpressmapperException.cs
diff --git a/ExpressMapper NET40/ExpressmapperExtensions.cs b/Expressmapper.Shared/ExpressmapperExtensions.cs
similarity index 100%
rename from ExpressMapper NET40/ExpressmapperExtensions.cs
rename to Expressmapper.Shared/ExpressmapperExtensions.cs
diff --git a/ExpressMapper NET40/FlattenLinqMethod.cs b/Expressmapper.Shared/FlattenLinqMethod.cs
similarity index 100%
rename from ExpressMapper NET40/FlattenLinqMethod.cs
rename to Expressmapper.Shared/FlattenLinqMethod.cs
diff --git a/ExpressMapper NET40/FlattenMapper.cs b/Expressmapper.Shared/FlattenMapper.cs
similarity index 100%
rename from ExpressMapper NET40/FlattenMapper.cs
rename to Expressmapper.Shared/FlattenMapper.cs
diff --git a/ExpressMapper NET40/FlattenMemberInfo.cs b/Expressmapper.Shared/FlattenMemberInfo.cs
similarity index 100%
rename from ExpressMapper NET40/FlattenMemberInfo.cs
rename to Expressmapper.Shared/FlattenMemberInfo.cs
diff --git a/ExpressMapper NET40/ICustomTypeMapper.cs b/Expressmapper.Shared/ICustomTypeMapper.cs
similarity index 100%
rename from ExpressMapper NET40/ICustomTypeMapper.cs
rename to Expressmapper.Shared/ICustomTypeMapper.cs
diff --git a/ExpressMapper NET40/IMappingContext.cs b/Expressmapper.Shared/IMappingContext.cs
similarity index 100%
rename from ExpressMapper NET40/IMappingContext.cs
rename to Expressmapper.Shared/IMappingContext.cs
diff --git a/ExpressMapper NET40/IMappingService.cs b/Expressmapper.Shared/IMappingService.cs
similarity index 97%
rename from ExpressMapper NET40/IMappingService.cs
rename to Expressmapper.Shared/IMappingService.cs
index e796f7b..a5cc885 100644
--- a/ExpressMapper NET40/IMappingService.cs
+++ b/Expressmapper.Shared/IMappingService.cs
@@ -1,22 +1,22 @@
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-
-namespace ExpressMapper
-{
- public interface IMappingService
- {
- IDictionary TypeMappers { get; }
- IDictionary CollectionMappers { get; }
- void PrecompileCollection();
- bool DestinationSupport { get; }
- MulticastDelegate MapCollection(long cacheKey);
- void Reset();
- BlockExpression MapCollection(Type srcColtype, Type destColType, Expression srcExpression, Expression destExpression);
- Expression GetDifferentTypeMemberMappingExpression(Expression srcExpression, Expression destExpression, bool newDest);
- BlockExpression MapProperty(Type srcType, Type destType, Expression srcExpression, Expression destExpression, bool newDest);
- Expression GetMemberMappingExpression(Expression left, Expression right, bool newDest);
- Expression GetMemberQueryableExpression(Type srcType, Type dstType);
- void Compile(CompilationTypes compilationType);
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+
+namespace ExpressMapper
+{
+ public interface IMappingService
+ {
+ IDictionary TypeMappers { get; }
+ IDictionary CollectionMappers { get; }
+ void PrecompileCollection();
+ bool DestinationSupport { get; }
+ MulticastDelegate MapCollection(long cacheKey);
+ void Reset();
+ BlockExpression MapCollection(Type srcColtype, Type destColType, Expression srcExpression, Expression destExpression);
+ Expression GetDifferentTypeMemberMappingExpression(Expression srcExpression, Expression destExpression, bool newDest);
+ BlockExpression MapProperty(Type srcType, Type destType, Expression srcExpression, Expression destExpression, bool newDest);
+ Expression GetMemberMappingExpression(Expression left, Expression right, bool newDest);
+ Expression GetMemberQueryableExpression(Type srcType, Type dstType);
+ void Compile(CompilationTypes compilationType);
+ }
+}
diff --git a/ExpressMapper NET40/IMappingServiceProvider.cs b/Expressmapper.Shared/IMappingServiceProvider.cs
similarity index 88%
rename from ExpressMapper NET40/IMappingServiceProvider.cs
rename to Expressmapper.Shared/IMappingServiceProvider.cs
index f02847e..b797e95 100644
--- a/ExpressMapper NET40/IMappingServiceProvider.cs
+++ b/Expressmapper.Shared/IMappingServiceProvider.cs
@@ -17,12 +17,14 @@ public interface IMappingServiceProvider
object Map(Type srcType, Type dstType, object src);
object Map(Type srcType, Type dstType, object src, object dest);
IMemberConfiguration Register();
+ IMemberConfiguration Register(IMemberConfigParameters baseType);
bool MapExists(Type sourceType, Type destinationType);
void RegisterCustom() where TMapper : ICustomTypeMapper;
void RegisterCustom(Func mapFunc);
void Reset();
long CalculateCacheKey(Type src, Type dest);
Dictionary> CustomMappers { get; }
+ Dictionary> CustomMappingsBySource { get; }
IQueryable Project(IQueryable source);
bool CaseSensetiveMemberMap { get; set; }
}
diff --git a/Expressmapper.Shared/IMemberConfigParameters.cs b/Expressmapper.Shared/IMemberConfigParameters.cs
new file mode 100644
index 0000000..14edfd5
--- /dev/null
+++ b/Expressmapper.Shared/IMemberConfigParameters.cs
@@ -0,0 +1,18 @@
+using System.Collections.Generic;
+using System.Linq.Expressions;
+
+namespace ExpressMapper
+{
+ public interface IMemberConfigParameters
+ {
+ List> CustomMembers { get; }
+ List> FlattenMembers { get; }
+ List> CustomFunctionMembers { get; }
+ List IgnoreMemberList { get; }
+ bool Flattened { get; set; }
+ bool CaseSensetiveMember { get; set; }
+ bool CaseSensetiveOverride { get; set; }
+ CompilationTypes CompilationTypeMember { get; set; }
+ bool CompilationTypeOverride { get; set; }
+ }
+}
diff --git a/ExpressMapper NET40/IMemberConfiguration.cs b/Expressmapper.Shared/IMemberConfiguration.cs
similarity index 89%
rename from ExpressMapper NET40/IMemberConfiguration.cs
rename to Expressmapper.Shared/IMemberConfiguration.cs
index 5a40117..0fed812 100644
--- a/ExpressMapper NET40/IMemberConfiguration.cs
+++ b/Expressmapper.Shared/IMemberConfiguration.cs
@@ -1,25 +1,28 @@
-using System;
-using System.Linq.Expressions;
-
-namespace ExpressMapper
-{
- ///
- /// Interface to extend the mapping
- ///
- /// source
- /// destination
- public interface IMemberConfiguration
- {
- IMemberConfiguration InstantiateFunc(Func constructor);
- IMemberConfiguration Instantiate(Expression> constructor);
- IMemberConfiguration Before(Action beforeHandler);
- IMemberConfiguration After(Action afterHandler);
- IMemberConfiguration Member(Expression> dest, Expression> src);
- IMemberConfiguration Function(Expression> dest, Func src);
- IMemberConfiguration Ignore(Expression> dest);
- IMemberConfiguration Value(Expression> dest, TNMember value);
- IMemberConfiguration CaseSensitive(bool caseSensitive);
- IMemberConfiguration CompileTo(CompilationTypes compilationType);
- IMemberConfiguration Flatten();
- }
-}
+using System;
+using System.Linq.Expressions;
+
+namespace ExpressMapper
+{
+ ///
+ /// Interface to extend the mapping
+ ///
+ /// source
+ /// destination
+ public interface IMemberConfiguration
+ {
+ IMemberConfiguration InstantiateFunc(Func constructor);
+ IMemberConfiguration Instantiate(Expression> constructor);
+ IMemberConfiguration Before(Action beforeHandler);
+ IMemberConfiguration After(Action afterHandler);
+ IMemberConfiguration Member(Expression> dest, Expression> src);
+ IMemberConfiguration Function(Expression> dest, Func src);
+ IMemberConfiguration Ignore(Expression> dest);
+ IMemberConfiguration Value(Expression> dest, TNMember value);
+ IMemberConfiguration CaseSensitive(bool caseSensitive);
+ IMemberConfiguration CompileTo(CompilationTypes compilationType);
+ IMemberConfiguration Flatten();
+
+ IMemberConfiguration Include() where TSub : T
+ where TNSub : TN;
+ }
+}
diff --git a/ExpressMapper NET40/ITypeMapper.cs b/Expressmapper.Shared/ITypeMapper.cs
similarity index 85%
rename from ExpressMapper NET40/ITypeMapper.cs
rename to Expressmapper.Shared/ITypeMapper.cs
index a24247f..c2768fe 100644
--- a/ExpressMapper NET40/ITypeMapper.cs
+++ b/Expressmapper.Shared/ITypeMapper.cs
@@ -7,6 +7,9 @@ namespace ExpressMapper
{
public interface ITypeMapper
{
+ bool BaseType { get; set; }
+ Type SourceType { get; }
+ Type DestinationType { get; }
Expression QueryableGeneralExpression { get; }
Func