Exemplo n.º 1
0
        public async Task<bool> TryHandleCommandAsync(IImmutableSet<IProjectTree> nodes, long commandId, bool focused, long commandExecuteOptions, IntPtr variantArgIn, IntPtr variantArgOut) {
            _appShell.AssertIsOnMainThread();
            if (commandId != RPackageCommandId.icmdSendToRemote) {
                return false;
            }

            var properties = _configuredProject.Services.ExportProvider.GetExportedValue<ProjectProperties>();
            string projectDir = Path.GetDirectoryName(_configuredProject.UnconfiguredProject.FullPath);
            string projectName = properties.GetProjectName();
            string remotePath = await properties.GetRemoteProjectPathAsync();

            await SendToRemoteAsync(nodes.GetAllFilePaths(), projectDir, projectName, remotePath, CancellationToken.None);

            return true;
        }
Exemplo n.º 2
0
        public async Task <bool> TryHandleCommandAsync(IImmutableSet <IProjectTree> nodes, long commandId, bool focused, long commandExecuteOptions, IntPtr variantArgIn, IntPtr variantArgOut)
        {
            _appShell.AssertIsOnMainThread();
            if (commandId != RPackageCommandId.icmdSendToRemote)
            {
                return(false);
            }

            var    properties  = _configuredProject.Services.ExportProvider.GetExportedValue <ProjectProperties>();
            string projectDir  = Path.GetDirectoryName(_configuredProject.UnconfiguredProject.FullPath);
            string projectName = properties.GetProjectName();
            string remotePath  = await properties.GetRemoteProjectPathAsync();

            await SendToRemoteAsync(nodes.GetAllFilePaths(), projectDir, projectName, remotePath);

            return(true);
        }