Collections/List.....

Jun 10, 2008 at 4:36 PM
Hello, I have a question, it is possible to assign a collection of objects, something like this

This is the class 



public class LogRespository
     (

         Private <Ilog> _Logs List;

         Public List <Ilog> Logs
         (
             Get
             (
                 Return _Logs;
             )
             September
             (
                 _Logs = Value;
             )
         )

         # region ILogRepository Members

         public void SendNotify (string message, Exception ex)
         (
             foreach (Ilog Log in Logs)
             (
                 Log.AddNotify (message, ex);
             )
         )

         # endregion
     )


and the web.config, is this possible?


<type type="IFormacion,namespace" mapTo="Formacion,namespace">

 

<

lifetime type="singleton" />

 

<

typeConfig extensionType="Microsoft.Practices.Unity.Configuration.TypeInjectionElement, Microsoft.Practices.Unity.Configuration">

 

<

property name="LogManager" propertyType="LogRepository">

 

<property name="logs">
<list name=log1">
<list name=log2">
<list name=log3">
<property>
</

property>

 

</

typeConfig>

 

</

type>


Thanks!

 

Jun 11, 2008 at 4:55 PM
I've seen some solution to this problem, even so I am not convinced at all
, Spring.net is the solution, thanks to all!