public BuildVariantsController(BuildVariantsStorage buildVariantsStorage,
                                       IBuildInfoController buildInfoController)
        {
            _buildVariantsStorage = buildVariantsStorage;
            _buildInfoController  = buildInfoController;

            _buildVariants = _buildVariantsStorage.LoadVariants();
        }
Ejemplo n.º 2
0
 public BuildVariantInspector
     (IBuildVariantsController buildVariantsController,
     IBuildInfoController buildInfoController, IProjectSettingsController projectSettingsController)
 {
     _buildVariantsController   = buildVariantsController;
     _buildInfoController       = buildInfoController;
     _projectSettingsController = projectSettingsController;
 }
Ejemplo n.º 3
0
 private static void CheckForUnsavedSettings(IBuildInfoController buildInfoController,
                                             IBuildVariantsController buildVariantsController, IProjectSettingsController projectSettingsController)
 {
     if (projectSettingsController.GetDiffWithActualSettings(buildVariantsController.BuildVariants.First(v =>
                                                                                                         v.Guid == buildInfoController.BuildInfo.ActiveVariantGuid)).Any())
     {
         throw new Exception("Active variant has unsaved settings!");
     }
 }
Ejemplo n.º 4
0
 public BuildVariantsExplorer(IBuildVariantsController buildVariantsController,
                              IBuildInfoController buildInfoController, IBuildTargetIcons buildTargetIcons,
                              IProjectSettingsController projectSettingsController)
 {
     _buildVariantsController   = buildVariantsController;
     _buildInfoController       = buildInfoController;
     _buildTargetIcons          = buildTargetIcons;
     _projectSettingsController = projectSettingsController;
 }
Ejemplo n.º 5
0
        public static void BuildVariant(IBuildInfoController buildInfoController,
                                        IBuildVariantsController buildVariantsController, IProjectSettingsController projectSettingsController,
                                        string variantGuid)
        {
            CheckForUnsavedSettings(buildInfoController, buildVariantsController, projectSettingsController);
            var buildVariant = buildVariantsController.BuildVariants.First(b => b.Guid == variantGuid);

            BuildVariant(projectSettingsController, buildVariant);
            RollBack(buildInfoController, buildVariantsController, projectSettingsController);
        }
Ejemplo n.º 6
0
 public static void BuildAll(IBuildInfoController buildInfoController,
                             IBuildVariantsController buildVariantsController,
                             IProjectSettingsController projectSettingsController)
 {
     CheckForUnsavedSettings(buildInfoController, buildVariantsController, projectSettingsController);
     foreach (var buildVariant in buildVariantsController.BuildVariants)
     {
         BuildVariant(projectSettingsController, buildVariant);
     }
     RollBack(buildInfoController, buildVariantsController, projectSettingsController);
 }
Ejemplo n.º 7
0
        public static void BuildColleciton(IBuildInfoController buildInfoController,
                                           IBuildVariantsController buildVariantsController, IProjectSettingsController projectSettingsController,
                                           string setName)
        {
            CheckForUnsavedSettings(buildInfoController, buildVariantsController, projectSettingsController);
            var set = buildInfoController.BuildInfo.VariantCollections.First(s => s.Name == setName);

            foreach (var buildVariant in buildVariantsController.BuildVariants)
            {
                if (set.GetBuildVariantGuids().Contains(buildVariant.Guid))
                {
                    BuildVariant(projectSettingsController, buildVariant);
                }
            }
            RollBack(buildInfoController, buildVariantsController, projectSettingsController);
        }
Ejemplo n.º 8
0
 private static void RollBack(IBuildInfoController buildInfoController,
                              IBuildVariantsController buildVariantsController, IProjectSettingsController projectSettingsController)
 {
     projectSettingsController.BuildAndApplyProjectSettings(buildVariantsController.BuildVariants.
                                                            First(v => v.Guid == buildInfoController.BuildInfo.ActiveVariantGuid));
 }