Results 1 to 3 of 3

Thread: Structuremap has a GetAllInstancesOf<T>

  1. #1
    Join Date
    Mar 2010
    Posts
    8

    Default Structuremap has a GetAllInstancesOf<T>

    Wonder if the same can be accomplished in Spring.NET?

    Structuremap scans the assemblies and later on, if there are more than one implementation of an interface, it can be fetched by ObjectFactory.GetAllInstancesOf<some type>();

    Utilizing such pattern can give you really big advantages over the normal Visitor Pattern etc.

    How can it be solved in Spring.NET?

    One interface, many implementations... get by type, not name

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    DefaultListableObjectFactory exposes a GetObjects<T> method that would seem to do the same (as I understand your question). This is available in the SPRNET 2.0.0 M1 preview just released yesterday.

    Does this address your need --?

  3. #3
    Join Date
    Mar 2010
    Posts
    8

    Default

    Yes I think so, thank you.

    If this really is what I think it is then it's very very exciting for me as a Spring.NET user, my work requires switching between StructureMap and Spring, what StructureMap misses can be done with Spring and vice versa.. and now this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •