I am trying to register the following class using the fluent interface:
public class DirectorySync : IDirectorySync
{
public DirectorySync(DirectoryInfo sourceDir, DirectoryInfo targetDir)
{
_sourceDirectory = sourceDir;
_targetDirectory = targetDir;
}
}
How do I go about specifying the DirectoryInfo instances? They should be:
var sourceDirectory = new DirectoryInfo("some known file path");
var installationDirectory = new DirectoryInfo("some other known file path");
This is what I have so far:
_container.Register(Component
.For<IDirectorySync>()
.ImplementedBy<DirectorySync>()
.Parameters(Parameter.ForKey("sourceDir").Eq(???))
.Parameters(Parameter.ForKey("targetDir").Eq(???))
.LifeStyle.Is(LifestyleType.Transient));