コード例 #1
0
        internal static void DownloadRepository(string unityAccessToken, string[] commandLineArgs)
        {
            Dictionary <string, string> args = CommandLineArguments.Build(commandLineArgs);

            mLog.DebugFormat(
                "Processing Unity arguments: {0}", string.Join(" ", commandLineArgs));

            string projectPath       = ParseArguments.ProjectPath(args);
            string cloudRepository   = ParseArguments.CloudProject(args);
            string cloudOrganization = ParseArguments.CloudOrganization(args);

            if (string.IsNullOrEmpty(projectPath) ||
                string.IsNullOrEmpty(cloudRepository) ||
                string.IsNullOrEmpty(cloudOrganization))
            {
                return;
            }

            SessionState.SetBool(
                SHOULD_PROJECT_BE_DOWNLOADED_KEY, true);

            PlasticApp.InitializeIfNeeded();

            DownloadRepositoryOperation downloadOperation =
                new DownloadRepositoryOperation();

            downloadOperation.DownloadRepositoryToPathIfNeeded(
                cloudRepository,
                cloudOrganization,
                Path.GetFullPath(projectPath),
                unityAccessToken);
        }
コード例 #2
0
        // Adds about 500ms to startup time
        static AssetMenuItems()
        {
            PlasticApp.InitializeIfNeeded();
            sPlasticAPI = new PlasticAPI();

            Enable();
        }
コード例 #3
0
        static void DownloadRepository(string unityAccessToken)
        {
            Dictionary <string, string> args = CommandLineArguments.Build(
                Environment.GetCommandLineArgs());

            mLog.DebugFormat(
                "Processing Unity arguments: {0}",
                string.Join(" ", Environment.GetCommandLineArgs()));

            string projectPath       = ParseArguments.ProjectPath(args);
            string cloudRepository   = ParseArguments.CloudProject(args);
            string cloudOrganization = ParseArguments.CloudOrganization(args);

            if (string.IsNullOrEmpty(projectPath) ||
                string.IsNullOrEmpty(cloudRepository) ||
                string.IsNullOrEmpty(cloudOrganization))
            {
                return;
            }

            PlasticApp.InitializeIfNeeded();

            DownloadRepositoryOperation downloadOperation =
                new DownloadRepositoryOperation();

            downloadOperation.DownloadRepositoryToPathIfNeeded(
                cloudRepository,
                cloudOrganization,
                Path.GetFullPath(projectPath),
                unityAccessToken);
        }
コード例 #4
0
        static void Execute(string unityAccessToken)
        {
            if (SessionState.GetInt(
                    IS_USER_BETA_PROGRAM_ALREADY_CALCULATED_KEY,
                    BETA_PROGRAM_NOT_CALCULATED) == BETA_PROGRAM_ENABLED)
            {
                PlasticMenuItem.Add();
                return;
            }

            PlasticApp.InitializeIfNeeded();

            EnableUserBetaProgramIfNeeded(unityAccessToken);
        }
コード例 #5
0
        static void Execute(string unityAccessToken)
        {
            if (SessionState.GetBool(
                    IS_USER_BETA_PROGRAM_ALREADY_CALCULATED_KEY, false))
            {
                return;
            }

            SessionState.SetBool(
                IS_USER_BETA_PROGRAM_ALREADY_CALCULATED_KEY, true);

            PlasticApp.InitializeIfNeeded();

            EnableUserBetaProgramIfNeeded(unityAccessToken);
        }
コード例 #6
0
        static void Execute(
            string unityAccessToken,
            string projectPath,
            string projectGuid)
        {
            string headCommitSha = GetCollabHeadCommitSha(projectPath, projectGuid);

            if (string.IsNullOrEmpty(headCommitSha))
                return;

            PlasticApp.InitializeIfNeeded();

            LaunchMigrationIfProjectIsArchivedAndMigrated(
                unityAccessToken,
                projectPath,
                projectGuid,
                headCommitSha);
        }
コード例 #7
0
 static void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     PlasticApp.InitializeIfNeeded();
 }
コード例 #8
0
ファイル: AssetMenuItems.cs プロジェクト: BaseDorp/TankGame
 static void DelayedInitialization()
 {
     PlasticApp.InitializeIfNeeded();
     Enable();
 }