Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have the same problem with initializing my application because there doesn't seam to exist a way to call static methods on a (static) class in spring.net. But you can try to make your class non-static try following:</p> <pre><code>public class RepositoryFactory { private static RepositoryFactory instance; private static readonly Dictionary&lt;string, object&gt; Repositories = new Dictionary&lt;string, object&gt;(); private RepositoryFactory() { } public static RepositoryFactory GetInstance() { if (instance == null) { instance = new RepositoryFactory(); } return instance; } public static void AddRepository(object repository) { Repositories.Add(repository.GetType().Name, repository); } } </code></pre> <p>with the spring-config:</p> <pre><code>&lt;objects xmlns="http://www.springframework.net" &gt; &lt;object id="RepositoryFactory" type="Edu3.Data.SubsonicProvider.RepositoryFramework.RepositoryFactory, %ASSEMBLY_NAME%" factory-method="GetInstance"&gt; &lt;property name="AddRepository" value="SsoUrlTemplateRepository" &gt;&lt;/property&gt; &lt;property name="AddRepository" value="PackageSessionNodeRepository" &gt;&lt;/property&gt; &lt;property name="AddRepository" value="PackageSessionNodeFinishedRepository" &gt;&lt;/property&gt; &lt;/object&gt; &lt;object id="SsoUrlTemplateRepository" type="SsoUrlTemplateRepository, %ASSEMBLY_NAME%" singleton="false"/&gt; &lt;object id="PackageSessionNodeRepository" type="PackageSessionNodeRepository, %ASSEMBLY_NAME%" singleton="false"/&gt; &lt;object id="PackageSessionNodeFinishedRepository" type="PackageSessionNodeFinishedRepository, %ASSEMBLY_NAME%" singleton="false"/&gt; &lt;/objects&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload