thedevstop/asfac — pull request #25 by JoeRobich (2014-01-29 14:13:36+00:00)
Title: Support multiple registration for a single type

**Problem:**

I have multiple types of `ITask` that I would like to register with the factory and retrieve all at once later when displaying them to the user.

**Suggestion:**

Multi-register types for an interface

``` actionscript
// Standard
factory.register(NaiveStrategy, IStrategy, NaiveStrategy, false);
factory.register(ExpertStrategy, IStrategy, ExpertStrategy, false);
var strategies:Array = factory.resolveAll(IStrategy);

// Fluent
factory.register(NaiveStrategy).forType(IStrategy);
factory.register(ExpertStrategy).forType(IStrategy);
var strategies:Array = factory.resolveAll(IStrategy);
```

Since we make multiple registrations for a type by changing scope, provide a method for resolving a type from all scopes. Make it easy to create these registrations in the Fluent interface by adding a `forType` to complement `asType`. `forType` will set the scope name based on the registered instance.