An example of the transfer of user settings:

 

const string custParamKey = "Test";
var custParamValue = new object();
var injector = new MugenInjector();
injector.Bind<SimpleParameterTest>()
        .ToMethod<SimpleParameterTest>(context =>
         {
                        Debug.Assert(context.SpecialParameters[custParamKey] == custParamValue);
                        return new SimpleParameterTest();
         });

injector.Get<SimpleParameterTest>(new Dictionary<string, object>() {{custParamKey, custParamValue}});

 

Last edited Apr 16, 2012 at 4:55 PM by VVS0205, version 2

Comments

No comments yet.