Hi

Just saw a session fro NDC2011 with Krzysztof Kozmic (http://
ndc2011.macsimum.no/mp4/Day3%20Friday/Track5%201340-1440.mp4) where
he's using Func<> to Lazy resolve the dependency, so what I'd really
would like, is to do something like:

    public class MyService
    {
        private IMyContext context;
        private readonly Func<IMyExporter> exporterfactory;
        public MyService(IMyContext context, Func<IMyExporter>
exporterfactory)
        {
            this.context = context;
            this.exporterfactory = exporterfactory;
        }

        public string Extractdata()
        {
            var exporter=exporterfactory();
            return exporter.Export();
        }
    }

However I would like to control what kind of exporter the
exporterfactory returns.....

Søren

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to