Remove mapping context from constructor

This commit is contained in:
Wvader 2021-12-07 11:58:58 +00:00
parent 771adf22ef
commit 55f735006e
1 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ namespace MapTo.Sources
builder
.GeneratePrivateConstructor(model)
.WriteLine()
.GenerateFactoryMethod(model)
//.GenerateFactoryMethod(model)
.GenerateUpdateMethod(model)
// End class declaration
@ -40,7 +40,7 @@ namespace MapTo.Sources
.WriteLine()
// Extension class declaration
.GenerateSourceTypeExtensionClass(model)
//.GenerateSourceTypeExtensionClass(model)
// End namespace declaration
.WriteClosingBracket();
@ -75,7 +75,7 @@ namespace MapTo.Sources
var baseConstructor = /*model.HasMappedBaseClass ? $" : base({mappingContextParameterName}, {sourceClassParameterName})" :*/ string.Empty;
builder
.WriteLine($"public {model.TypeIdentifierName}({MappingContextSource.ClassName} {mappingContextParameterName}, {model.SourceType} {sourceClassParameterName}){baseConstructor}")
.WriteLine($"public {model.TypeIdentifierName}({model.SourceType} {sourceClassParameterName}){baseConstructor}")
.WriteOpeningBracket()
//.WriteLine($"if ({mappingContextParameterName} == null) throw new ArgumentNullException(nameof({mappingContextParameterName}));")
//.WriteLine($"if ({sourceClassParameterName} == null) throw new ArgumentNullException(nameof({sourceClassParameterName}));")