Closed nathan-chappell closed 1 year ago
A couple more things:
IEnumerable sourceEnumerable = (IEnumerable)source;
is better as var sourceEnumerable = (IEnumerable)source;
, right?Type sourceType = source?.GetType() ?? typeof(TSource);
this seems incorrect. I'll push a test.
Readme
Looks better, but you need to tone it down a bit. Also, if you're going to use chatgpt (or some other text generation tool) you should indicate this. There should be a disclaimer, or a link to one, right near the top, that states that this was created in part by AI or LLMs or something. But, if you're going to use those tools you have to make it write it in a better tone. Hear are a few examples:
The constructor that is going to be used is the one with the fewest parameters.
The tests have been executed successfully.
You need to be careful with this because if your class does not have a default constructor you will get an exception.
If your class does not have a default constructor a WhatFreakingTypeOfexception will be thrown.
In essence, this project stands as a testament to the exploration of reflection and its practical applications
So it's way better than before, just actually read it once fix some of the obvious stuff.
Code
DefinedMappingConfiurations
is misspelledelse if (DefinedMappingConfiurations.ContainsKey((sourceType, destinationType)) == true)
. It can be a bit confusing, because there is a valid reason to do this, when the value might be null. It looks like you decided to do a null check and forgot to fix this.IMapper.cs
file is perfect now. Did you write the documentation for the interface, or did you have it generated? It's very good.this.IgnoreProperties = this.IgnoreProperties?.Any() == true ? this.IgnoreProperties.Append(propertyToIgnore) : new[] { propertyToIgnore };
I'm pretty sure I know why you're doing this. We'll talk about it.//Assert.That(nodeACopy.Next!.Next, Is.EqualTo(nodeACopy));
Next time let's leave the test failing until we both agree that we don't need it...