Beispiel #1
0
        public IJobHandlerManage AddJobHandler(string jobhandlerName, IJobHandler jobHandler)
        {
            var key = jobhandlerName.ToLower();

            if (_jobHandlers.ContainsKey(key))
            {
                throw new Exception($"JobHandlerAttrbute配置重复,{jobHandler.GetType().FullName}");
            }
            _jobHandlers.TryAdd(key, jobHandler);
            return(this);
        }