/// <summary>
        /// 开始
        /// </summary>
        /// <param name="programStartInfos">程序启动信息集合</param>
        public static void Start(ProgramStartInfo[] programStartInfos = null)
        {
            if (programStartInfos == null)
            {
                if (ProgramConfigReader == null)
                {
                    return;
                }

                programStartInfos = ProgramConfigReader.Reader();
            }

            if (programStartInfos.IsNullOrLength0())
            {
                return;
            }

            IProgramStart[] programStarts = new IProgramStart[programStartInfos.Length];
            for (int i = 0; i < programStarts.Length; i++)
            {
                programStarts[i] = ReflectExtensions.CreateInstance <IProgramStart>(programStartInfos[i].FullClass);
            }

            for (int i = 0; i < programStarts.Length; i++)
            {
                programStarts[i].Start(programStartInfos[i].Args);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 创建实例
 /// </summary>
 /// <typeparam name="T">实例类型</typeparam>
 /// <param name="classFullPath">类全路径</param>
 /// <returns>实例</returns>
 public T CreateInstance <T>(string classFullPath)
     where T : class
 {
     return(ReflectExtensions.CreateInstance <T>(classFullPath));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 创建实例
 /// </summary>
 /// <param name="classFullPath">类全路径</param>
 /// <returns>实例</returns>
 public object CreateInstance(string classFullPath)
 {
     return(ReflectExtensions.CreateInstance(classFullPath));
 }