Example #1
0
        public void Something()
        {
            // you can use the factory here safely
            // but the actual provider is configured elsewhere
            FooFactory factory = new FooFactory();

            IFoo foo = factory.CreateFoo();
        }
Example #2
0
    public void Example()
    {
        var c = new Container();

        c.Register <Repo>();
        c.Register <IFoo>(made: Made.Of(() => FooFactory.CreateFoo(Arg.Of <Repo>())));
        Assert.IsNotNull(c.Resolve <IFoo>());
    }