-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible optimisation for chain of mutations? #7
Comments
@SuddenGunter thanks for posting this. using Remutable.Extensions;
...
var employee = new Employee(Guid.NewGuid(), "Joe", "Doe");
var actual = employee
.Remute(x => x.FirstName, "Foo")
.Remute(x => x.LastName, "Bar");
Assert.AreEqual("Foo", actual.FirstName);
Assert.AreEqual("Bar", actual.LastName); |
@ababik, thank you!
after calling this - how many employee were actually allocated in memory? |
@SuddenGunter |
But is there some possible "magic" that we can use to make it 2? :) |
It's doable. |
Just local variables, small services on .Net Core in docker. It would be ok? |
Absolutely. |
Hi @ababik , |
@mmalek06 |
Just for the context: there is a bit of complexity for this feature because remute supports nested "mutations". E.g |
If we need to apply several mutations one by one to an entity and we don't need any intermediate
results, it would be good if we can achieve it by creating only 1 new instance of entity:
Now:
Want to:
The text was updated successfully, but these errors were encountered: