ipjohnson / Grace

Grace is a feature rich dependency injection container library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable evaluation of delegates?

teinarss opened this issue · comments

Is it possible to disable evaluation of delegates?

Test case:

public class DiTest
{
  public DiTest(Func<string> test)
  {
  }
}

...
var a1 = new { test = new Func<string>(() => "hello world") };

container.Locate<DiTest>(a1);

Sorry for the very late response. There's not a great way for you to do what you're looking for.

I could offer some suggestions but they all require some configuration and probably are not what you're looking for (plus I'm a month late responding).