public async Task <WorkingDirectoryObject> OpenDirectoryAsync(string applicationName, int version, string directoryName, int objectId) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); var application = await applicationProvider.Get(); if (application == null) { throw new SettingNotFoundException(directoryName); } var directory = application.Directories.SingleOrDefault(d => string.Equals(d.Name, directoryName)); if (directory == null) { throw new SettingNotFoundException(directoryName); } var workingDirectory = new WorkingDirectoryObject(directory, applicationName, version, objectId, _url, _apiKey); workingDirectory.UseCache = true; workingDirectory.ExplicitlySave = false; await workingDirectory.Reload(); return(workingDirectory); }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurationViewCommand" /> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private ConfigurationViewCommand(Package package) { if (package == null) { throw new ArgumentNullException(nameof(package)); } this.package = package; ApplicationProvider.Register <DTE, DTE>((DTE)ServiceProvider.GetService(typeof(DTE))); ApplicationProvider.Register <IVsOutputWindowPane, IVsOutputWindowPane>( (IVsOutputWindowPane)ServiceProvider.GetService(typeof(SVsGeneralOutputWindowPane))); ApplicationProvider.Register <ITeamFoundationServerService, TeamFoundationServerService>(); ApplicationProvider.Register <IVsStatusbar, IVsStatusbar>( (IVsStatusbar)ServiceProvider.GetService(typeof(SVsStatusbar))); var commandService = ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { var menuCommandId = new CommandID(CommandSet, CommandId); var menuItem = new MenuCommand(ShowToolWindow, menuCommandId); commandService.AddCommand(menuItem); } }
public EnterPasswordWindow(ApplicationUser user) { InitializeComponent(); _user = user; _clientService = ApplicationProvider.GetProxy(); HostameLable.Content = _user.Hostname; UsernameLable.Content = _user.Username; }
public async Task <bool> DeleteApplicationVersionAsync(string applicationName, int version) { if (version == 1) { throw new SettingsException("Cannot delete version 1"); } var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.DeleteVerion(version)); }
public static void WriteOutput(string text) { var service = ApplicationProvider.GetInstance <IVsOutputWindowPane>(); if (service == null) { return; } service.Activate(); service.OutputStringThreadSafe($"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}: {text}{Environment.NewLine}"); }
public async Task <bool> DeleteDirectoryAsync(string applicationName, string directoryName) { if (string.Equals(directoryName, "root", StringComparison.CurrentCultureIgnoreCase) || string.Equals(directoryName, "root", StringComparison.CurrentCultureIgnoreCase)) { throw new SettingsException("This directory can not be deleted"); } var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.DeleteDirectory(directoryName)); }
public Main() { InitializeComponent(); _mapper = AutoMapperProvider.GetIMapper(); _database = ApplicationProvider.GetUnitOfWork(); _clientService = ApplicationProvider.GetProxy(); Show(); //SetIcons(); Configure(); }
public MainViewModel() { LoadCommand = new AsyncCommand(LoadAsync); SaveCommand = new DefaultCommand(Save); DeploayCommand = new AsyncCommand(DeployAsync); BuildSolutionCommand = new AsyncCommand(BuildSolutionAsync); DirCommand = new ParamCommand <string>(SetDeployPath); Configuration = new ConfigData(); Data = new ObservableCollection <ProjectData>(); service = ApplicationProvider.GetInstance <DTE>(); tfsServer = ApplicationProvider.GetInstance <ITeamFoundationServerService>(); service.Events.SolutionEvents.Opened += _Opened; service.Events.SolutionEvents.BeforeClosing += _BeforeClosing; }
public async Task <bool> DirectoryExists(string applicationName, string directoryName) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.DirectoryExists(directoryName)); }
//private void MenuItemCallback(object sender, EventArgs e) //{ // try // { // WriteOutput(VSConstants.OutputWindowPaneGuid.DebugPane_guid, "Hello World in Debug pane"); // WriteOutput(VSConstants.OutputWindowPaneGuid.BuildOutputPane_guid, "Hello World in Build pane"); // WriteOutput(VSConstants.OutputWindowPaneGuid.GeneralPane_guid, "Hello World in General pane"); // } // catch (Exception ex) // { // System.Windows.Forms.MessageBox.Show(ex.ToString()); // } //} public static void ClearOutput() { var service = ApplicationProvider.GetInstance <IVsOutputWindowPane>(); service.Clear(); }
public Form1() { InitializeComponent(); Tools.Copy(); ApplicationProvider = new ApplicationProvider(groupBox1); }
public async Task <bool> VersionExists(string applicationName, int version) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.VerionExists(version)); }
public async Task <bool> CreateApplicationVersionAsync(string applicationName, int version) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.CreateVerion(version)); }
public async Task <SettingsApplication> GetApplication(string applicatinName) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicatinName); return(await applicationProvider.Get()); }
public LoginWindow() { InitializeComponent(); _mapper = AutoMapperProvider.GetIMapper(); _clientService = ApplicationProvider.GetProxy(); }
public async Task <bool> UpdateDirectoryAsync(string applicationName, string directoryName, string newDirectoryName, string description) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.UpdateDirectory(directoryName, newDirectoryName, description)); }
public async Task <bool> CopyDirectoryAsync(string applicationName, string directoryName, string newDirectoryName, int version) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); return(await applicationProvider.CopyDirectory(directoryName, newDirectoryName, version)); }