Hi
if i have a component registered with :
<code>
<component id="GenericReportDataRepository"
type="Ideal.Reporting.Domain.GenericReportDataRepository`1,
Ideal.Reporting.Domain"/>
</code>
is there anyway i can retrieve that by using something similar to:
<code>
var ass = Assembly.Load(assemblyname);
var type = ass.GetType(typename);
Type openType = typeof(GenericReportDataRepository<>);
Type actualType = openType.MakeGenericType(new Type[] { type });
object obj = Activator.CreateInstance(actualType);
var genrepo = Container.Resolve<GenericReportDataRepository<obj>>();
</code>
I know the code sucks in terms of names and stuff - i'm just typing it
in to gmail - just trying to figure out how to do this.
struggling a bit :)
--
Cheers,
w://
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---