Callbacks
Now it is possible to define a callback with the new Do()
method. It works essencially just like the With()
method, but with a different signature.
var project = MagicFactory.For<Project>()
.With(x => x.ProjectName = "Apollo")
.Do(x => Console.WriteLine(x.ProjectName) // prints "Apollo"
.Build();