public PublishOptionsDialogModelTest()
 {
     _coreShell = Substitute.For <ICoreShell>();
     _pss       = Substitute.For <IProjectSystemServices>();
     _pcsp      = Substitute.For <IProjectConfigurationSettingsProvider>();
     _storage   = Substitute.For <IWritableSettingsStorage>();
 }
Esempio n. 2
0
 public PublishSProcOptionsCommand(IApplicationShell appShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider)
 {
     _appShell            = appShell;
     _pss                 = pss;
     _pcsp                = pcsp;
     _dacServicesProvider = dacServicesProvider;
 }
Esempio n. 3
0
        private SqlPublshOptionsDialog(IApplicationShell appShell, IProjectSystemServices pss, IFileSystem fs, IProjectConfigurationSettingsProvider pcsp)
        {
            _appShell = appShell;
            _pss      = pss;
            _pcsp     = pcsp;

            Title = Package.Resources.SqlPublishDialog_Title;
        }
Esempio n. 4
0
        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);
        }
        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 PublishSProcOptionsCommand(ICoreShell shell, IProjectSystemServices pss,
                                   IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider)
 {
     _shell = shell;
     _pss   = pss;
     _pcsp  = pcsp;
     _dacServicesProvider = dacServicesProvider;
     _settings            = shell.GetService <ISettingsStorage>();
 }
        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(IApplicationShell appShell, IProjectSystemServices pss, 
                                   IProjectConfigurationSettingsProvider pcsp, IDacPackageServicesProvider dacServicesProvider,
                                   ISettingsStorage settings) {
     _appShell = appShell;
     _pss = pss;
     _pcsp = pcsp;
     _dacServicesProvider = dacServicesProvider;
     _settings = settings;
 }
        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;
        }
Esempio n. 11
0
        public SettingsPageControl(IProjectConfigurationSettingsProvider settingsProvider, IApplicationShell appShell, IFileSystem fs) {
            Check.ArgumentNull(nameof(settingsProvider), settingsProvider);
            Check.ArgumentNull(nameof(appShell), appShell);
            Check.ArgumentNull(nameof(fs), fs);

            _settingsProvider = settingsProvider;
            _appShell = appShell;
            _fs = fs;
            InitializeComponent();
        }
        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);
        }
Esempio n. 14
0
 public static async Task<IEnumerable<IConfigurationSetting>> GetDatabaseConnections(this ConfiguredProject configuredProject, IProjectConfigurationSettingsProvider provider) {
     var dict = new Dictionary<string, string>();
     if (configuredProject != null) {
         using (var access = await provider.OpenProjectSettingsAccessAsync(configuredProject)) {
             return access.Settings
                     .Where(s => s.EditorType.EqualsOrdinal(ConnectionStringEditor.ConnectionStringEditorName));
         }
     }
     return Enumerable.Empty<IConfigurationSetting>();
 }
 public ConfigurationSettingCommand(
         int id, string settingNameTemplate,
         IProjectSystemServices pss,
         IProjectConfigurationSettingsProvider pcsp,
         IRInteractiveWorkflow workflow) : base(id, workflow) {
     _id = id;
     _settingNameTemplate = settingNameTemplate;
     _projectSystemServices = pss;
     _projectConfigurationSettingsProvider = pcsp;
 }
Esempio n. 16
0
        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);
        }
Esempio n. 17
0
        public SettingsPageControl(IProjectConfigurationSettingsProvider settingsProvider, ICoreShell shell, IFileSystem fs)
        {
            Check.ArgumentNull(nameof(settingsProvider), settingsProvider);
            Check.ArgumentNull(nameof(shell), shell);
            Check.ArgumentNull(nameof(fs), fs);

            _settingsProvider = settingsProvider;
            _shell            = shell;
            _fs = fs;
            InitializeComponent();
        }
Esempio n. 18
0
 public ConfigurationSettingCommand(
     int id, string settingNameTemplate,
     IProjectSystemServices pss,
     IProjectConfigurationSettingsProvider pcsp,
     IRInteractiveWorkflow workflow) : base(id, workflow)
 {
     _id = id;
     _settingNameTemplate   = settingNameTemplate;
     _projectSystemServices = pss;
     _projectConfigurationSettingsProvider = pcsp;
 }
Esempio n. 19
0
        public ProjectSettingsControlTest(PackageTestFilesFixture files) {
            _files = files;
            _appShell = Substitute.For<IApplicationShell>();
            _fs = Substitute.For<IFileSystem>();

            _access = Substitute.For<IProjectConfigurationSettingsAccess>();
            _access.Settings.Returns(_coll);

            _csp = Substitute.For<IProjectConfigurationSettingsProvider>();
            _csp.OpenProjectSettingsAccessAsync(null, null).ReturnsForAnyArgs(Task.FromResult(_access));

            _unconfiguredProject = Substitute.For<UnconfiguredProject>();
            _unconfiguredProject.FullPath.Returns(@"C:\file.rproj");

            _properties = Substitute.For<IRProjectProperties>();
            _properties.GetSettingsFileAsync().Returns(Task.FromResult<string>(null));
        }
Esempio n. 20
0
        public ProjectSettingsControlTest(PackageTestFilesFixture files)
        {
            _files = files;
            _shell = Substitute.For <ICoreShell>();
            _fs    = Substitute.For <IFileSystem>();

            _access = Substitute.For <IProjectConfigurationSettingsAccess>();
            _access.Settings.Returns(_coll);

            _csp = Substitute.For <IProjectConfigurationSettingsProvider>();
            _csp.OpenProjectSettingsAccessAsync(null, null).ReturnsForAnyArgs(Task.FromResult(_access));

            _unconfiguredProject = Substitute.For <UnconfiguredProject>();
            _unconfiguredProject.FullPath.Returns(@"C:\file.rproj");

            _properties = Substitute.For <IRProjectProperties>();
            _properties.GetSettingsFileAsync().Returns(Task.FromResult <string>(null));
        }
Esempio n. 21
0
 public AddDbConnectionCommand(IDbConnectionService dbcs, IProjectSystemServices pss,
                               IProjectConfigurationSettingsProvider pcsp, IRInteractiveWorkflow workflow) :
     base(RPackageCommandId.icmdAddDatabaseConnection, "dbConnection", pss, pcsp, workflow)
 {
     _dbcs = dbcs;
 }
Esempio n. 22
0
 public AddDbConnectionCommand(IDbConnectionService dbcs, IProjectSystemServices pss,
         IProjectConfigurationSettingsProvider pcsp, IRInteractiveWorkflow workflow) :
     base(RPackageCommandId.icmdAddDatabaseConnection, "dbConnection", pss, pcsp, workflow) {
     _dbcs = dbcs;
 }
 public PublishOptionsDialogModelTest() {
     _coreShell = Substitute.For<ICoreShell>();
     _pss = Substitute.For<IProjectSystemServices>();
     _pcsp = Substitute.For<IProjectConfigurationSettingsProvider>();
     _storage = Substitute.For<ISettingsStorage>();
 }
 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;
 }
        private SqlPublishOptionsDialogViewModel(SqlSProcPublishSettings settings,
            ICoreShell coreShell, IProjectSystemServices pss,
            IProjectConfigurationSettingsProvider pcsp) {
            _coreShell = coreShell;
            _pss = pss;
            _pcsp = pcsp;

            Settings = settings;
        }
 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;
 }
Esempio n. 27
0
        public static async Task <IEnumerable <IConfigurationSetting> > GetDatabaseConnections(this ConfiguredProject configuredProject, IProjectConfigurationSettingsProvider provider)
        {
            var dict = new Dictionary <string, string>();

            if (configuredProject != null)
            {
                using (var access = await provider.OpenProjectSettingsAccessAsync(configuredProject)) {
                    return(access.Settings
                           .Where(s => s.EditorType.EqualsOrdinal(ConnectionStringEditor.ConnectionStringEditorName)));
                }
            }
            return(Enumerable.Empty <IConfigurationSetting>());
        }
Esempio n. 28
0
 public PublishSProcOptionsCommand(IApplicationShell appShell, IProjectSystemServices pss, IProjectConfigurationSettingsProvider pcsp)
 {
     _appShell = appShell;
     _pss      = pss;
     _pcsp     = pcsp;
 }