/// <summary> /// 注册自动运行类,建议此函数在Global.Application_Start中执行 /// </summary> /// <param name="target"></param> public static void RegisterAutoRun(IRun target) { Type targetType = target.GetType(); if (Runnings.Any(m => m.TargetType == targetType) == false) { Runnings.Add(new RunningItem { Target = target, TargetType = targetType }); } }