structuremap/structuremap — pull request #233 by KevM (2014-03-14 14:57:00+00:00)
Title: GetAllInstances : When mixed open closed generic types are present only closed types are resolved

Sharing these passing tests in hopes that they document the current GetAllInstances behavior for mixed open and closed generic types. Currently in 2.6 and 3.0 when both open and closed types are registered in the Container for the requested generic type only close instances are resolved.

I am working around this currently by only registering open types into the container. I constrain the open type that is really for a single concrete type by using generic constraints.

```cs
public class OpenButConstrained : INeedAnEntity where T : Entity {}
```

Jeremy and I discussed on Twitter that having mixed and open and closed types returned would diverge from existing behavior. He suggested that a policy be created to add this behavior to StructureMap 3 in the future.