Пример #1
0
        /// <summary>
        /// 添加ue
        /// </summary>
        /// <param name="services"></param>
        /// <param name="configFile"></param>
        /// <param name="isCache"></param>
        /// <returns></returns>
        public static UEditorActionCollection AddUEditorService(
            this IServiceCollection services,
            string configFile = "config.json",
            bool isCache      = false)
        {
            Config.ConfigFile = configFile;
            Config.noCache    = !isCache;

            var actions = new UEditorActionCollection();

            services.AddSingleton(actions);
            services.AddSingleton <UEditorService>();

            return(actions);
        }
Пример #2
0
 public UEditorService(IHostingEnvironment env, UEditorActionCollection actions)
 {
     Config.WebRootPath = env.WebRootPath;
     actionList         = actions;
 }