Remove mapping context from constructor
This commit is contained in:
parent
771adf22ef
commit
55f735006e
|
@ -32,7 +32,7 @@ namespace MapTo.Sources
|
||||||
builder
|
builder
|
||||||
.GeneratePrivateConstructor(model)
|
.GeneratePrivateConstructor(model)
|
||||||
.WriteLine()
|
.WriteLine()
|
||||||
.GenerateFactoryMethod(model)
|
//.GenerateFactoryMethod(model)
|
||||||
.GenerateUpdateMethod(model)
|
.GenerateUpdateMethod(model)
|
||||||
|
|
||||||
// End class declaration
|
// End class declaration
|
||||||
|
@ -40,7 +40,7 @@ namespace MapTo.Sources
|
||||||
.WriteLine()
|
.WriteLine()
|
||||||
|
|
||||||
// Extension class declaration
|
// Extension class declaration
|
||||||
.GenerateSourceTypeExtensionClass(model)
|
//.GenerateSourceTypeExtensionClass(model)
|
||||||
|
|
||||||
// End namespace declaration
|
// End namespace declaration
|
||||||
.WriteClosingBracket();
|
.WriteClosingBracket();
|
||||||
|
@ -75,7 +75,7 @@ namespace MapTo.Sources
|
||||||
var baseConstructor = /*model.HasMappedBaseClass ? $" : base({mappingContextParameterName}, {sourceClassParameterName})" :*/ string.Empty;
|
var baseConstructor = /*model.HasMappedBaseClass ? $" : base({mappingContextParameterName}, {sourceClassParameterName})" :*/ string.Empty;
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.WriteLine($"public {model.TypeIdentifierName}({MappingContextSource.ClassName} {mappingContextParameterName}, {model.SourceType} {sourceClassParameterName}){baseConstructor}")
|
.WriteLine($"public {model.TypeIdentifierName}({model.SourceType} {sourceClassParameterName}){baseConstructor}")
|
||||||
.WriteOpeningBracket()
|
.WriteOpeningBracket()
|
||||||
//.WriteLine($"if ({mappingContextParameterName} == null) throw new ArgumentNullException(nameof({mappingContextParameterName}));")
|
//.WriteLine($"if ({mappingContextParameterName} == null) throw new ArgumentNullException(nameof({mappingContextParameterName}));")
|
||||||
//.WriteLine($"if ({sourceClassParameterName} == null) throw new ArgumentNullException(nameof({sourceClassParameterName}));")
|
//.WriteLine($"if ({sourceClassParameterName} == null) throw new ArgumentNullException(nameof({sourceClassParameterName}));")
|
||||||
|
|
Loading…
Reference in New Issue