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); }
// Adds about 500ms to startup time static AssetMenuItems() { PlasticApp.InitializeIfNeeded(); sPlasticAPI = new PlasticAPI(); Enable(); }
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); }
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); }
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); }
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); }
static void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e) { PlasticApp.InitializeIfNeeded(); }
static void DelayedInitialization() { PlasticApp.InitializeIfNeeded(); Enable(); }