May 29, 2010 at 6:47 PM
Edited Jun 1, 2010 at 2:06 PM
Hello, I have some trouble understanding how to write the Unity configuration for injecting delegates. My class is like this:
public class MyService
public MyService(Func<string, string> stringProcessor)
// Save stringProcessor for later use.
and I have another class that implements a delegate:
public class MyStringProcessor
string Processor(string input)
var output = input;
// Process output...
How should the configuration look to inject a new MyStringProcessor().Processor into the MyService constructor?
I haven't found any example of this in the forums.
PS: I have obviously some trouble posting as well... How can I format my post???
Edit: reformatted my post