Is it possible to vary the results of the
that is evaluated by the
I have a very simple test class that contains a static variable:
private static Type typeToDecorate = null;
And I have registered my classes and decorator like so:
c => c.ImplementationType == typeToDecorate);
What I've found it is that the call
will only evaluate the decorators the first time.
In the code below I set things up to decorate
and make a call to
. I then set things up to have
decorated but the second call to
returns the same results as the first call. I.e.
is decorated and not
typeToDecorate = typeof(CommandHandler1<Command>);
var result = container
typeToDecorate = typeof(CommandHandler2<Command>);
result = container
Have I misunderstood something?