예제 #1
0
 private static void Foreach(Action <ProjectConfig> action, SolutionConfig solution)
 {
     foreach (var project in solution.Projects)
     {
         Foreach(action, project);
     }
 }
예제 #2
0
 private static void Foreach(Func <ProjectConfig, bool> condition, Action <ProjectConfig> action,
                             SolutionConfig solution)
 {
     foreach (var project in solution.Projects)
     {
         Foreach(condition, action, project);
     }
 }
예제 #3
0
 private static void Foreach(Action <ConfigBase> action, SolutionConfig solution)
 {
     DoAction(action, solution);
     foreach (var project in solution.Projects)
     {
         Foreach(action, project);
     }
 }
예제 #4
0
 private static void Foreach(Func <ConfigBase, bool> condition, Action <ConfigBase> action,
                             SolutionConfig solution)
 {
     DoAction(condition, action, solution);
     foreach (var project in solution.Projects)
     {
         Foreach(condition, action, project);
     }
 }
예제 #5
0
        private static void Foreach <T>(Func <T, bool> condition, Action <T> action, SolutionConfig solution)
            where T : ConfigBase
        {
            int lv = level;

            DoAction(condition, action, solution);
            foreach (var project in solution.Projects)
            {
                level = lv + 1;
                Foreach(condition, action, project);
            }

            level = lv;
        }
예제 #6
0
 /// <summary>
 ///     所有对象遍历
 /// </summary>
 public static void ForeachAll(SolutionConfig solution, Action <ConfigBase> action)
 {
     action(solution);
     foreach (var project in solution.Projects)
     {
         action(project);
         foreach (var entity in project.Entities)
         {
             action(entity);
             foreach (var field in entity.Properties)
             {
                 action(field);
             }
             foreach (var command in entity.Commands)
             {
                 action(command);
             }
         }
     }
     foreach (var config in solution.Enums)
     {
         action(config);
         foreach (var item in config.Items)
         {
             action(item);
         }
     }
     foreach (var config in solution.TypedefItems)
     {
         action(config);
         foreach (var item in config.Items.Values)
         {
             action(item);
         }
     }
     foreach (var item in solution.TypedefItems)
     {
         action(item);
     }
     foreach (var config in solution.ApiItems)
     {
         action(config);
     }
     foreach (var config in solution.NotifyItems)
     {
         action(config);
     }
 }
예제 #7
0
 /// <summary>
 /// 设置当前解决方案
 /// </summary>
 /// <param name="solution"></param>
 public static void SetCurrentSolution(SolutionConfig solution)
 {
     SolutionConfig.SetCurrentSolution(solution);
     GlobalTrigger.Reset();
     GlobalTrigger.OnLoad(solution);
 }
예제 #8
0
 /// <summary>
 /// 设置当前解决方案
 /// </summary>
 /// <param name="solution"></param>
 public static void OnSolutionLoad(SolutionConfig solution)
 {
     GlobalTrigger.OnLoad(solution);
 }
예제 #9
0
 /// <summary>
 /// 设置当前解决方案
 /// </summary>
 /// <param name="solution"></param>
 public static void SetCurrentSolution(SolutionConfig solution)
 {
     Current = solution;
 }