예제 #1
0
        internal async Task DeployMono(OleMenuCommand menuCommand)
        {
            try
            {
                string teamNumber = Package.GetTeamNumber();

                if (teamNumber == null)
                {
                    return;
                }



                //Disable Install Button
                m_installing        = true;
                menuCommand.Visible = false;

                DeployManager m      = new DeployManager(Package.PublicGetService(typeof(DTE)) as DTE);
                MonoDeploy    deploy = new MonoDeploy(teamNumber, m, m_monoFile);

                await deploy.DeployMono();

                m_installing        = false;
                menuCommand.Visible = true;
            }
            catch (Exception ex)
            {
                Output.WriteLine(ex.ToString());
                m_installing        = false;
                menuCommand.Visible = true;
            }
        }
예제 #2
0
        internal async Task DeployMonoAsync(OleMenuCommand menuCommand)
        {
            try
            {
                string teamNumber = await Package.GetTeamNumberAsync().ConfigureAwait(false);

                if (teamNumber == null)
                {
                    return;
                }

                //Disable Install Button
                await ThreadHelperExtensions.SwitchToUiThread();

                m_installing        = true;
                menuCommand.Visible = false;

                MonoDeploy deploy = new MonoDeploy(teamNumber, m_monoFile);

                await deploy.DeployMonoAsync().ConfigureAwait(true);

                m_installing        = false;
                menuCommand.Visible = true;
            }
            catch (Exception ex)
            {
                await Output.WriteLineAsync(ex.ToString()).ConfigureAwait(false);

                await ThreadHelperExtensions.SwitchToUiThread();

                m_installing        = false;
                menuCommand.Visible = true;
            }
        }