public SProcPublisherTest(PackageTestFilesFixture files) { _files = files; _shell = Substitute.For <ICoreShell>(); _pss = Substitute.For <IProjectSystemServices>(); _dacServices = Substitute.For <IDacPackageServices>(); }
public PublishSProcCommand(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IDacPackageServicesProvider dacServicesProvider, ISettingsStorage settings) { _appShell = appShell; _pss = pss; _fs = fs; _dacServicesProvider = dacServicesProvider; _settings = settings; }
public SProcGeneratorTest(PackageTestFilesFixture files) { _files = files; _pss = Substitute.For <IProjectSystemServices>(); _project = Substitute.For <EnvDTE.Project>(); _project.FullName.Returns(Path.Combine(_files.DestinationPath, sqlProjectName)); }
public CommandTest() { _shell = TestCoreShell.CreateSubstitute(); _pss = Substitute.For <IProjectSystemServices>(); _servicesProvider = Substitute.For <IDacPackageServicesProvider>(); _storage = Substitute.For <ISettingsStorage>(); }
public RDebugLaunchProvider(ConfiguredProject configuredProject, IRInteractiveWorkflowProvider interactiveWorkflowProvider, IProjectSystemServices pss) : base(configuredProject) { _properties = configuredProject.Services.ExportProvider.GetExportedValue <ProjectProperties>(); _interactiveWorkflow = interactiveWorkflowProvider.GetOrCreate(); _pss = pss; }
/// <summary> /// Retrieves list of files that represent stored procedures in R /// </summary> /// <returns></returns> public static IEnumerable<string> GetSProcFiles(this EnvDTE.Project project, IProjectSystemServices pss) { var rFiles = pss.GetProjectFiles(project).Where(x => Path.GetExtension(x).EqualsIgnoreCase(".R")); var sqlFiles = new HashSet<string>(pss.GetProjectFiles(project).Where(x => Path.GetExtension(x).EqualsIgnoreCase(".sql"))); return rFiles.Where(x => sqlFiles.Contains(x.ToQueryFilePath(), StringComparer.OrdinalIgnoreCase) && sqlFiles.Contains(x.ToSProcFilePath(), StringComparer.OrdinalIgnoreCase)); }
public SProcPublisher(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IDacPackageServices dacServices) { _appShell = appShell; _pss = pss; _fs = fs; _dacServices = dacServices; _outputWindow = new OutputWindowLogWriter(VSConstants.OutputWindowPaneGuid.BuildOutputPane_guid, string.Empty); }
public PublishOptionsDialogModelTest() { _coreShell = Substitute.For <ICoreShell>(); _pss = Substitute.For <IProjectSystemServices>(); _pcsp = Substitute.For <IProjectConfigurationSettingsProvider>(); _storage = Substitute.For <IWritableSettingsStorage>(); }
public PublishSProcOptionsCommand(IApplicationShell appShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider) { _appShell = appShell; _pss = pss; _pcsp = pcsp; _dacServicesProvider = dacServicesProvider; }
public PublishSProcCommand(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IDacPackageServicesProvider dacServicesProvider) { _appShell = appShell; _pss = pss; _fs = fs; _dacServicesProvider = dacServicesProvider; }
public PublishSProcCommand(ICoreShell shell, IProjectSystemServices pss, IDacPackageServicesProvider dacServicesProvider, ISettingsStorage settings) { _shell = shell; _pss = pss; _dacServicesProvider = dacServicesProvider; _settings = settings; }
public SProcPublisher(IServiceContainer services, IProjectSystemServices pss, IDacPackageServices dacServices) { _services = services; _pss = pss; _dacServices = dacServices; _outputWindow = new OutputWindowLogWriter(services, VSConstants.OutputWindowPaneGuid.BuildOutputPane_guid, string.Empty); }
private SqlPublshOptionsDialog(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp) { _appShell = appShell; _pss = pss; _pcsp = pcsp; Title = Package.Resources.SqlPublishDialog_Title; }
public CommandTest() { _shell = Substitute.For <ICoreShell>(); _pss = Substitute.For <IProjectSystemServices>(); _servicesProvider = Substitute.For <IDacPackageServicesProvider>(); _fs = Substitute.For <IFileSystem>(); _storage = Substitute.For <ISettingsStorage>(); }
private SqlPublshOptionsDialog(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { _appShell = appShell; _pss = pss; _pcsp = pcsp; _settings = settings; Title = Package.Resources.SqlPublishDialog_Title; }
public static async Task <SqlPublshOptionsDialog> CreateAsync( ICoreShell shell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { var dialog = new SqlPublshOptionsDialog(shell, pss, shell.FileSystem(), pcsp, settings); await dialog.InitializeModelAsync(); return(dialog); }
public static async Task <SqlPublshOptionsDialog> CreateAsync( IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp) { var dialog = new SqlPublshOptionsDialog(appShell, pss, fs, pcsp); await dialog.InitializeModelAsync(); return(dialog); }
public SProcGeneratorTest(PackageTestFilesFixture files) { _files = files; _coreShell = Substitute.For<ICoreShell>(); _pss = Substitute.For<IProjectSystemServices>(); _project = Substitute.For<EnvDTE.Project>(); _project.FullName.Returns(Path.Combine(_files.DestinationPath, sqlProjectName)); }
private SqlPublshOptionsDialog(ICoreShell shell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { _shell = shell; _pss = pss; _pcsp = pcsp; _settings = settings; Title = Package.Resources.SqlPublishDialog_Title; }
public PublishSProcOptionsCommand(IApplicationShell appShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider, ISettingsStorage settings) { _appShell = appShell; _pss = pss; _pcsp = pcsp; _dacServicesProvider = dacServicesProvider; _settings = settings; }
public static async Task<SqlPublshOptionsDialog> CreateAsync( IApplicationShell appShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { var dialog = await CreateAsync(appShell, pss, new FileSystem(), pcsp, settings); await appShell.SwitchToMainThreadAsync(); dialog.InitializeComponent(); dialog.InitializeUI(); return dialog; }
public PublishSProcOptionsCommand(ICoreShell shell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider) { _shell = shell; _pss = pss; _pcsp = pcsp; _dacServicesProvider = dacServicesProvider; _settings = shell.GetService <ISettingsStorage>(); }
public AddItemCommand(UnconfiguredProject project, IProjectSystemServices pss, int id, string templateName, string fileName, string extension) { _unconfiguredProject = project; _pss = pss; _commandId = id; _templateName = templateName; _fileName = fileName; _extension = extension; }
private SqlPublishOptionsDialogViewModel(SqlSProcPublishSettings settings, ICoreShell coreShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp) { _coreShell = coreShell; _pss = pss; _pcsp = pcsp; Settings = settings; }
public static async Task <SqlPublishOptionsDialogViewModel> CreateAsync( SqlSProcPublishSettings settings, ICoreShell coreShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp) { var model = new SqlPublishOptionsDialogViewModel(settings, coreShell, pss, pcsp); await model.InitializeAsync(); return(model); }
public ConfigurationSettingCommand( int id, string settingNameTemplate, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IRInteractiveWorkflow workflow) : base(id, workflow) { _id = id; _settingNameTemplate = settingNameTemplate; _projectSystemServices = pss; _projectConfigurationSettingsProvider = pcsp; }
public SProcPublisherTest(PackageTestFilesFixture files) { _files = files; _shell = TestCoreShell.CreateSubstitute(); _shell.ServiceManager.RemoveService(_shell.ServiceManager.GetService <IFileSystem>()); _shell.ServiceManager.AddService(new WindowsFileSystem()); _pss = Substitute.For <IProjectSystemServices>(); _dacServices = Substitute.For <IDacPackageServices>(); }
public static async Task <SqlPublshOptionsDialog> CreateAsync( ICoreShell shell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { var dialog = await CreateAsync(shell, pss, new FileSystem(), pcsp, settings); await shell.SwitchToMainThreadAsync(); dialog.InitializeComponent(); dialog.InitializeUI(); return(dialog); }
private static string MakeCsvFileName(ICoreShell shell, IProjectSystemServices pss, string variableName) { var project = pss.GetActiveProject(); var projectName = project?.FileName; var contentTypeService = shell.GetService <IContentTypeRegistryService>(); var viewTracker = shell.GetService <IActiveWpfTextViewTracker>(); var activeView = viewTracker.GetLastActiveTextView(contentTypeService.GetContentType(RContentTypeDefinition.ContentType)); var filePath = activeView.GetFilePath(); var csvFileName = string.Empty; if (!string.IsNullOrEmpty(projectName)) { csvFileName += Path.GetFileNameWithoutExtension(projectName); csvFileName += "_"; } if (!string.IsNullOrEmpty(filePath)) { csvFileName += Path.GetFileNameWithoutExtension(filePath); csvFileName += "_"; } if (variableName.StartsWith("$", StringComparison.Ordinal)) { variableName = variableName.Substring(1); } int invalidCharIndex = variableName.IndexOfAny(Path.GetInvalidFileNameChars()); variableName = MakeFileSystemCompatible(variableName); if (variableName.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0) { variableName = _variableNameReplacement; } csvFileName += variableName; return(csvFileName); }
public RDebugLaunchProvider(ConfiguredProject configuredProject, IRInteractiveWorkflowProvider interactiveWorkflowProvider, IProjectSystemServices pss) : base(configuredProject) { _properties = configuredProject.Services.ExportProvider.GetExportedValue<ProjectProperties>(); _interactiveWorkflow = interactiveWorkflowProvider.GetOrCreate(); _pss = pss; }
public WorkspaceServices(IProjectSystemServices pss) { _pss = pss; }
private static string MakeCsvFileName(IApplicationShell appShell, IProjectSystemServices pss, string variableName) { var project = pss.GetActiveProject(); var projectName = project?.FileName; var contentTypeService = appShell.ExportProvider.GetExportedValue<IContentTypeRegistryService>(); var viewTracker = appShell.ExportProvider.GetExportedValue<IActiveWpfTextViewTracker>(); var activeView = viewTracker.GetLastActiveTextView(contentTypeService.GetContentType(RContentTypeDefinition.ContentType)); var filePath = activeView.GetFilePath(); var csvFileName = string.Empty; if (!string.IsNullOrEmpty(projectName)) { csvFileName += Path.GetFileNameWithoutExtension(projectName); csvFileName += "_"; } if (!string.IsNullOrEmpty(filePath)) { csvFileName += Path.GetFileNameWithoutExtension(filePath); csvFileName += "_"; } if (variableName.StartsWith("$", StringComparison.Ordinal)) { variableName = variableName.Substring(1); } int invalidCharIndex = variableName.IndexOfAny(Path.GetInvalidFileNameChars()); variableName = MakeFileSystemCompatible(variableName); if (variableName.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0) { variableName = _variableNameReplacement; } csvFileName += variableName; return csvFileName; }
public SetDirectoryToProjectCommand(IRInteractiveWorkflow interactiveWorkflow, IProjectSystemServices pss) : base(RGuidList.RCmdSetGuid, (int)RPackageCommandId.icmdSetDirectoryToProjectCommand) { _interactiveWorkflow = interactiveWorkflow; _pss = pss; }
public AddRMarkdownCommand(UnconfiguredProject unconfiguredProject, IProjectSystemServices pss): base(unconfiguredProject, pss, RPackageCommandId.icmdAddRMarkdown, "emptyrmd", "markdown", "rmd") { }
public PublishSProcCommand(ICoreShell shell, IProjectSystemServices pss, IDacPackageServicesProvider dacServicesProvider) : this(shell, pss, dacServicesProvider, shell.GetService <ISettingsStorage>()) { }
public AddDbConnectionCommand(IDbConnectionService dbcs, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IRInteractiveWorkflow workflow) : base(RPackageCommandId.icmdAddDatabaseConnection, "dbConnection", pss, pcsp, workflow) { _dbcs = dbcs; }
public CommandTest() { _appShell = Substitute.For<IApplicationShell>(); _pss = Substitute.For<IProjectSystemServices>(); }
public PublishSProcCommand(ICoreShell shell, IProjectSystemServices pss, IDacPackageServicesProvider dacServicesProvider, ISettingsStorage settings) : this(shell, pss, shell.FileSystem(), dacServicesProvider, settings) { }
public PublishOptionsDialogModelTest() { _coreShell = Substitute.For<ICoreShell>(); _pss = Substitute.For<IProjectSystemServices>(); _pcsp = Substitute.For<IProjectConfigurationSettingsProvider>(); _storage = Substitute.For<ISettingsStorage>(); }
public PublishSProcCommand(IApplicationShell appShell, IProjectSystemServices pss, IDacPackageServicesProvider dacServicesProvider, ISettingsStorage settings) : this(appShell, pss, new FileSystem(), dacServicesProvider, settings) { }
public static async Task<SqlPublishOptionsDialogViewModel> CreateAsync( SqlSProcPublishSettings settings, ICoreShell coreShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp) { var model = new SqlPublishOptionsDialogViewModel(settings, coreShell, pss, pcsp); await model.InitializeAsync(); return model; }
public static async Task<SqlPublshOptionsDialog> CreateAsync( IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp, ISettingsStorage settings) { var dialog = new SqlPublshOptionsDialog(appShell, pss, fs, pcsp, settings); await dialog.InitializeModelAsync(); return dialog; }
public SProcProjectFilesGenerator(IProjectSystemServices pss, IFileSystem fs) { _pss = pss; _fs = fs; }
public CommandTest() { _appShell = Substitute.For <IApplicationShell>(); _pss = Substitute.For <IProjectSystemServices>(); }
public SProcPublisherTest(PackageTestFilesFixture files) { _files = files; _appShell = Substitute.For<IApplicationShell>(); _pss = Substitute.For<IProjectSystemServices>(); _dacServices = Substitute.For<IDacPackageServices>(); }
public AddRScriptCommand(UnconfiguredProject unconfiguredProject, IProjectSystemServices pss) : base(unconfiguredProject, pss, RPackageCommandId.icmdAddRScript, "rscript", "script", "R") { }