Exemplo n.º 1
0
 public virtual T registerAsSingleton <T, K>(IInfoContext infoctx, string applicationType, params object[] args)
 {
     if (isLoadable(infoctx, applicationType))
     {
         Type clazz = typeof(K);
         return((T)FunctionCaller.registerAsSingleton <T>(clazz, args));
     }
     return(default(T));
 }
Exemplo n.º 2
0
        public static T RegisterAsSingleton <T, K>(params object[] args)
        {
            Type clazz = typeof(K);

            return(FunctionCaller.registerAsSingleton <T>(clazz, args));
        }
Exemplo n.º 3
0
        public static T RegisterAsSingleton <T, K>()
        {
            Type clazz = typeof(K);

            return(FunctionCaller.registerAsSingleton <T>(clazz));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Register a Singleton Class
 /// </summary>
 /// <typeparam name="T">Generic Type Interface </typeparam>
 /// <param name="className"> NameSpace and Class Name that Implement T. </param>
 /// <returns>Interface's implementation</returns>
 public static T RegisterAsSingleton <T>(string className)
 {
     return(FunctionCaller.registerAsSingleton <T>(className));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Register a Singleton Class with its fields
 /// </summary>
 /// <typeparam name="T">Generic Type Interface </typeparam>
 /// <param name="className"> NameSpace and Class Name that Implement T. </param>
 /// <param name="args"> fields of this Class. </param>
 /// <returns>Interface's implementation</returns>
 public static T RegisterAsSingleton <T>(string className, params object[] args)
 {
     return(FunctionCaller.registerAsSingleton <T>(className, args));
 }
Exemplo n.º 6
0
        public static T registerAsSingleton <T>(string className, params object[] args)
        {
            Type clazz = GetType(className);

            return(FunctionCaller.registerAsSingleton <T>(clazz, args));
        }