コード例 #1
0
    public static bool IsRequestedTargetExactlyProjectFiles()
    {
        var commandLineTargets = StandaloneBeeDriver.GetCommandLineTargets();

        if (commandLineTargets.Count() != 1)
        {
            return(false);
        }

        return(commandLineTargets.Single() == "ProjectFiles");
    }
コード例 #2
0
    private static bool IsRequestedTargetExactlySingleAppSingleConfig()
    {
        var commandLineTargets = StandaloneBeeDriver.GetCommandLineTargets();

        if (commandLineTargets.Count() != 1)
        {
            return(false);
        }

        var commandLineTarget = commandLineTargets.Single();
        var ret = PerConfigBuildSettings.Any(entry => entry.Value.Any(v => v.Identifier == commandLineTarget));

        return(ret);
    }
コード例 #3
0
    static bool CanSkipSetupOf(string programName, DotsRuntimeCSharpProgramConfiguration config)
    {
        /* This is disabled for now (11/12/2019) because we have a theory that because there will be very few
         * bee targets overall, we don't need to optimize project files as much as we used to.
         * But we should re-enable this check if we see project files taking too long to generate.
         */
        /*if (IsRequestedTargetExactlyProjectFiles())
         *  return true;*/

        if (!IsRequestedTargetExactlySingleAppSingleConfig())
        {
            return(false);
        }

        return(config.Identifier != StandaloneBeeDriver.GetCommandLineTargets().Single());
    }
コード例 #4
0
    static bool CanSkipSetupOf(string programName, DotsRuntimeCSharpProgramConfiguration config)
    {
        /* This is disabled for now (11/12/2019) because we have a theory that because there will be very few
         * bee targets overall, we don't need to optimize project files as much as we used to.
         * But we should re-enable this check if we see project files taking too long to generate.
         */
        /*if (IsRequestedTargetExactlyProjectFiles())
         *  return true;*/

        if (!IsRequestedTargetExactlySingleAppSingleConfig())
        {
            return(false);
        }

        //If there is complementary target its config identifier is generated from main target identifier by adding slash symbol
        //and complementary target name. So only part before slash should be compared with target from command line.
        //See comment in DotsConfigs.cs, DotsConfigs.MakeConfigs() method for details
        var slash      = config.Identifier.IndexOf('/');
        var identifier = slash == -1 ? config.Identifier : config.Identifier.Substring(0, slash);

        return(identifier != StandaloneBeeDriver.GetCommandLineTargets().Single());
    }