/// <summary> /// Instantiate all Dao types in the specified assembly and place them into the specified /// serviceProvider /// </summary> /// <param name="daoAssembly"></param> /// <param name="serviceProvider"></param> public static void RegisterDaoTypes(Assembly daoAssembly, Incubator serviceProvider) { Type[] types = daoAssembly.GetTypes(); for (int i = 0; i < types.Length; i++) { Type current = types[i]; if (current.IsSubclassOf(typeof(Dao))) { serviceProvider.Construct(current); } } }
/// <summary> /// Register the speicified generic type T as a ServiceProxy responder. /// </summary> /// <typeparam name="T"></typeparam> public static void Register <T>() { Initialize(); Incubator.Construct <T>(); }
/// <summary> /// Register the specified type as a ServiceProxy responder. /// </summary> /// <param name="type"></param> public static void Register(Type type) { Initialize(); Incubator.Construct(type); }