Intanda
unread,Jan 16, 2012, 3:49:37 AM1/16/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Castle Project Users
Hi
Being new to both this forum and Castle I apologies in advance if the
following question has already been asked and answered
Based on the below contrived example can generic types, such as
TestGenericType, be created via instance factory methods when using
the Windsor Castle IoC framework? ( NB - Our current method of
component configuration relies on the XML based approach rather then
the fluent interface. )
//Example Generic Object
public class TestGenericObject<T, U>
{
public TestGenericObject()
{
}
private IList<T> someGenericList = new List<T>();
private IDictionary<string, U> someStringKeyedDictionary =
new Dictionary<string, U>();
public IList<T> SomeGenericList
{
//get; set; someGenericList
}
public IDictionary<string, U> SomeStringKeyedDictionary
{
//get; set someStringKeyedDictionary;
}
}
//Example Factory
public class TestGenericObjectFactory
{
public static TestGenericObject<V, W> StaticCreateInstance<V, W>()
{
return new TestGenericObject<V, W>();
}
}
Thanks in advance