Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up IoC registration to provide Default settings
- Loading branch information
Showing
4 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Castle.Core; | ||
using Castle.MicroKernel.Context; | ||
using Castle.MicroKernel.Handlers; | ||
using System; | ||
using System.Linq; | ||
|
||
namespace Rubberduck.Root | ||
{ | ||
class FixedGenericAppender : IGenericImplementationMatchingStrategy | ||
{ | ||
private readonly Type[] closingGenerics; | ||
|
||
public FixedGenericAppender(Type[] closingGenerics) | ||
{ | ||
this.closingGenerics = closingGenerics; | ||
} | ||
|
||
public Type[] GetGenericArguments(ComponentModel model, CreationContext context) | ||
{ | ||
return context.GenericArguments.Union(closingGenerics).ToArray(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters