Calling generic method in spring.net application context
Posted
by Bert Vandamme
on Stack Overflow
See other posts from Stack Overflow
or by Bert Vandamme
Published on 2010-03-12T12:46:04Z
Indexed on
2010/03/12
12:47 UTC
Read the original article
Hit count: 486
Hi,
I'm trying to invoke this method in spring.net, but i'm having trouble getting the configuration right.
Method:
public void AddRepository(IRepository repository) where TEntity : IEntity { Repositories.Add(repository.GetType().Name, repository); }
Config:
<object type="Spring.Objects.Factory.Config.MethodInvokingFactoryObject, Spring.Core"> <property name="TargetObject"> <ref local="RepositoryFactory" /> </property> <property name="TargetMethod" value="AddRepository"/> <property name="Arguments"> <list> <ref object="BinaryAssetFileRepository"/> </list> </property> </object>"
Is it possible to address generic methods in this way?
Thx,
Bert
© Stack Overflow or respective owner