public RenamerProjectTreeActionHandler( UnconfiguredProject unconfiguredProject, IUnconfiguredProjectVsServices projectVsServices, [Import(typeof(VisualStudioWorkspace))] Workspace workspace, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IWaitIndicator waitService, IVsOnlineServices vsOnlineServices, IProjectThreadingService threadingService, IVsUIService <IVsExtensibility, IVsExtensibility3> extensibility, IVsService <SVsOperationProgress, IVsOperationProgressStatusService> operationProgressService, IVsService <SVsSettingsPersistenceManager, ISettingsManager> settingsManagerService) { _unconfiguredProject = unconfiguredProject; _projectVsServices = projectVsServices; _workspace = workspace; _environmentOptions = environmentOptions; _userNotificationServices = userNotificationServices; _roslynServices = roslynServices; _waitService = waitService; _vsOnlineServices = vsOnlineServices; _threadingService = threadingService; _extensibility = extensibility; _operationProgressService = operationProgressService; _settingsManagerService = settingsManagerService; }
//private readonly IUserSubscriptionsManageServices _subscriptionsManageServices; public UserController() { _notificationServices = DependencyResolver.Current.GetService <IUserNotificationServices>(); _userPortalServices = DependencyResolver.Current.GetService <IUserPortalServices>(); _billingManageServices = DependencyResolver.Current.GetService <IBillingManageServices>(); //_subscriptionsManageServices = DependencyResolver.Current.GetService<IUserSubscriptionsManageServices>(); }
public FileRenameTracker(IUnconfiguredProjectVsServices projectVsServices, VisualStudioWorkspace visualStudioWorkspace, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices) { _projectVsServices = projectVsServices; _visualStudioWorkspace = visualStudioWorkspace; _environmentOptions = environmentOptions; _userNotificationServices = userNotificationServices; _roslynServices = roslynServices; }
public SimpleRenameStrategy( IProjectThreadingService threadingService, IUserNotificationServices userNotificationService, IEnvironmentOptions environmentOptions, IRoslynServices roslynServices) : base(threadingService, userNotificationService, environmentOptions, roslynServices) { }
public ProjectReloadManager(IProjectThreadingService threadHandling, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IUserNotificationServices userNotificationServices, IDialogServices dialogServices) : base(threadHandling.JoinableTaskContext) { _threadHandling = threadHandling; _serviceProvider = serviceProvider; _userNotificationServices = userNotificationServices; _dialogServices = dialogServices; }
public AbstractRenameStrategy( IProjectThreadingService threadingService, IUserNotificationServices userNotificationService, IEnvironmentOptions environmentOptions, IRoslynServices roslynServices) { _threadingService = threadingService; _userNotificationServices = userNotificationService; _environmentOptions = environmentOptions; _roslynServices = roslynServices; }
internal Renamer(IUnconfiguredProjectVsServices projectVsServices, IUnconfiguredProjectTasksService unconfiguredProjectTasksService, VisualStudioWorkspace workspace, IVsService <Shell.Interop.SDTE, EnvDTE.DTE> dte, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IWaitIndicator waitService, IRefactorNotifyService refactorNotifyService) : this(projectVsServices, unconfiguredProjectTasksService, workspace as Workspace, dte, environmentOptions, userNotificationServices, roslynServices, waitService, refactorNotifyService) { }
public FileRenameTracker(IUnconfiguredProjectVsServices projectVsServices, VisualStudioWorkspace visualStudioWorkspace, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices) { Requires.NotNull(projectVsServices, nameof(projectVsServices)); Requires.NotNull(visualStudioWorkspace, nameof(visualStudioWorkspace)); Requires.NotNull(environmentOptions, nameof(environmentOptions)); Requires.NotNull(userNotificationServices, nameof(userNotificationServices)); Requires.NotNull(roslynServices, nameof(roslynServices)); _projectVsServices = projectVsServices; _visualStudioWorkspace = visualStudioWorkspace; _environmentOptions = environmentOptions; _userNotificationServices = userNotificationServices; _roslynServices = roslynServices; }
public FileRenameTracker(IUnconfiguredProjectVsServices projectVsServices, VisualStudioWorkspace visualStudioWorkspace, IOptionsSettings optionsSettings, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices) { Requires.NotNull(projectVsServices, nameof(projectVsServices)); Requires.NotNull(visualStudioWorkspace, nameof(visualStudioWorkspace)); Requires.NotNull(optionsSettings, nameof(optionsSettings)); Requires.NotNull(userNotificationServices, nameof(userNotificationServices)); Requires.NotNull(roslynServices, nameof(roslynServices)); _projectVsServices = projectVsServices; _visualStudioWorkspace = visualStudioWorkspace; _optionsSettings = optionsSettings; _userNotificationServices = userNotificationServices; _roslynServices = roslynServices; }
public StandardLicenseEnforcer(ILicenseServices licenseServices, IProductInformationServices productInformationServices, IProductUsageServices productUsageServices, IUserInterfaceServices userInterfaceServices, IUserNotificationServices userNotificationServices, IDuplicateProcessDetector duplicateProcessDetector, IConfigurationServices configurationServices) { SimultaneousLicenseEnforcements = 0; CountAppliedLicense = 0; CountNagged = 0; LicenseServices = licenseServices; ProductInformationServices = productInformationServices; ProductUsageServices = productUsageServices; UserInterfaceServices = userInterfaceServices; DuplicateProcessDetector = duplicateProcessDetector; ConfigurationServices = configurationServices; UserNotificationServices = userNotificationServices; Rights = DetermineRights(); ConfigurationServices.ConfigurationChanged += (sender, args) => DetermineRights(); }
public SettingsViewModel(INavigation navigation = null) : base(navigation) { SetPageImageSize(); _settingService = DependencyService.Get <IUserSettingService>(); _notificationServices = DependencyService.Get <IUserNotificationServices>(); ProfileLoadingComplete = false; TitleProfile = TextResources.EditProfile; TitlePassword = TextResources.ChangePassword; TitleUserSetting = TextResources.UserSettings; CountryProvinces = new List <CountryProvince>(); CountryList = new List <string>(); StateList = new List <string>(); ApplicationLanguages = new List <ApplicationLanguage>(); GetCountryList(async() => { await TabSelected(TabTitle.EditProfile); }); }
public TestRenamerProjectTreeActionHandler( UnconfiguredProject unconfiguredProject, IUnconfiguredProjectVsServices projectVsServices, [Import(typeof(VisualStudioWorkspace))] Workspace workspace, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IWaitIndicator waitService, IVsOnlineServices vsOnlineServices, IProjectThreadingService threadingService, IVsUIService <IVsExtensibility, IVsExtensibility3> extensibility, IVsService <SVsOperationProgress, IVsOperationProgressStatusService> operationProgressService) : base(unconfiguredProject, projectVsServices, workspace, environmentOptions, userNotificationServices, roslynServices, waitService, vsOnlineServices, threadingService, extensibility, operationProgressService) { }
internal async Task RenameAsync(string sourceCode, string oldFilePath, string newFilePath, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IVsOnlineServices vsOnlineServices, string language, IVsService <SVsSettingsPersistenceManager, ISettingsManager> settingsManagerService) { var unconfiguredProject = UnconfiguredProjectFactory.Create(fullPath: $@"C:\project1.{ProjectFileExtension}"); var projectServices = IUnconfiguredProjectVsServicesFactory.Implement( threadingServiceCreator: () => IProjectThreadingServiceFactory.Create(), unconfiguredProjectCreator: () => unconfiguredProject); using var ws = new AdhocWorkspace(); ws.AddSolution(InitializeWorkspace(ProjectId.CreateNewId(), oldFilePath, sourceCode, language)); var environmentOptionsFactory = IEnvironmentOptionsFactory.Implement((string category, string page, string property, bool defaultValue) => { return(true); }); var waitIndicator = (new Mock <IWaitIndicator>()).Object; var projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create(); var projectThreadingService = IProjectThreadingServiceFactory.Create(); var refactorNotifyService = (new Mock <IRefactorNotifyService>()).Object; var extensibility = new Mock <IVsUIService <IVsExtensibility, IVsExtensibility3> >().Object; var operationProgressMock = new Mock <IVsService <SVsOperationProgress, IVsOperationProgressStatusService> >().Object; var context = new Mock <IProjectTreeActionHandlerContext>().Object; var mockNode = new Mock <IProjectTree>(); mockNode.SetupGet(x => x.FilePath).Returns(oldFilePath); mockNode.SetupGet(x => x.IsFolder).Returns(false); var node = mockNode.Object; var renamer = new TestRenamerProjectTreeActionHandler(unconfiguredProject, projectServices, ws, environmentOptionsFactory, userNotificationServices, roslynServices, waitIndicator, vsOnlineServices, projectAsynchronousTasksService, projectThreadingService, extensibility, operationProgressMock, settingsManagerService); await renamer.RenameAsync(context, node, newFilePath) .TimeoutAfter(TimeSpan.FromSeconds(1)); }
public NotificationSettingViewModel(INavigation navigation = null) : base(navigation) { _notificationServices = DependencyService.Get <IUserNotificationServices>(); WeightSubmitReminderText = TextResources.Notification_WeightSubmitReminder; PromotionalText = TextResources.Notification_Promotional; SpecialOfferText = TextResources.Notification_SpecialOffer; VersionUpdateText = TextResources.Notification_VersionUpdate; GeneralMessageText = TextResources.Notification_GeneralMessage; NotificationsText = TextResources.Notifications; IsGeneralMessageText = SetBoolToString(); IsPromotionalText = SetBoolToString(); IsSpecialOfferText = SetBoolToString(); IsVersionUpdateText = SetBoolToString(); IsWeightSubmitReminderText = SetBoolToString(); GetNotificationStatus(); }
internal Renamer(Workspace workspace, IProjectThreadingService threadingService, IUserNotificationServices userNotificationServices, IEnvironmentOptions environmentOptions, IRoslynServices roslynServices, Project project, string oldFilePath, string newFilePath) { _workspace = workspace; _threadingService = threadingService; _userNotificationServices = userNotificationServices; _environmentOptions = environmentOptions; _roslynServices = roslynServices; _project = project; _newFilePath = newFilePath; _oldFilePath = oldFilePath; }
public TestRenamerProjectTreeActionHandler( UnconfiguredProject unconfiguredProject, IUnconfiguredProjectVsServices projectVsServices, [Import(typeof(VisualStudioWorkspace))] Workspace workspace, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IWaitIndicator waitService, IVsOnlineServices vsOnlineServices, [Import(ExportContractNames.Scopes.UnconfiguredProject)] IProjectAsynchronousTasksService projectAsynchronousTasksService, IProjectThreadingService threadingService, IVsUIService <IVsExtensibility, IVsExtensibility3> extensibility, IVsService <SVsOperationProgress, IVsOperationProgressStatusService> operationProgressService, IVsService <SVsSettingsPersistenceManager, ISettingsManager> settingsManagerService) : base(unconfiguredProject, projectVsServices, workspace, environmentOptions, userNotificationServices, roslynServices, waitService, vsOnlineServices, projectAsynchronousTasksService, threadingService, extensibility, operationProgressService, settingsManagerService) { }
internal Renamer(Workspace workspace, IProjectThreadingService threadingService, IUserNotificationServices userNotificationServices, IOptionsSettings optionsSettings, IRoslynServices roslynServices, Project project, string oldFilePath, string newFilePath) { _workspace = workspace; _threadingService = threadingService; _userNotificationServices = userNotificationServices; _optionsSettings = optionsSettings; _roslynServices = roslynServices; _project = project; _newFilePath = newFilePath; _oldFilePath = oldFilePath; _oldDocument = (from d in project.Documents where StringComparers.Paths.Equals(d.FilePath, oldFilePath) select d).FirstOrDefault(); }
internal Renamer(IUnconfiguredProjectVsServices projectVsServices, IUnconfiguredProjectTasksService unconfiguredProjectTasksService, [Import(typeof(VisualStudioWorkspace))] Workspace workspace, IVsUIService <Shell.Interop.SDTE, DTE> dte, IEnvironmentOptions environmentOptions, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, IWaitIndicator waitService, IRefactorNotifyService refactorNotifyService) { _projectVsServices = projectVsServices; _unconfiguredProjectTasksService = unconfiguredProjectTasksService; _workspace = workspace; _dte = dte; _environmentOptions = environmentOptions; _userNotificationServices = userNotificationServices; _roslynServices = roslynServices; _waitService = waitService; _refactorNotifyService = refactorNotifyService; }
public DontShowAgainMessageBox(string caption, string message, string checkboxText, bool initialStateOfCheckbox, string learnMoreText, string learnMoreUrl, IUserNotificationServices userNotificationServices) { _userNotificationServices = userNotificationServices; InitializeComponent(); DataContext = this; DialogCaption = caption; MessageText = message; PreviewKeyDown += new KeyEventHandler(CloseOnESCkey); DontShowAgainCheckBox.Visibility = Visibility.Collapsed; if (checkboxText != null) { DontShowAgainCheckBox.Visibility = Visibility.Visible; CheckboxText = checkboxText; CheckboxState = initialStateOfCheckbox; } LearnMore.Visibility = Visibility.Collapsed; if (learnMoreText != null) { LearnMore.Visibility = Visibility.Visible; LearnMoreText = learnMoreText; LearnMoreCommand = new RelayCommand((parameter) => { try { Process.Start(learnMoreUrl); } catch (Exception ex) { _userNotificationServices.ShowMessageBox(ex.Message, null, OLEMSGICON.OLEMSGICON_CRITICAL, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); } }); } }
public DontShowAgainMessageBox(string caption, string message, string?checkboxText, bool initialStateOfCheckbox, string?learnMoreText, string learnMoreUrl, IUserNotificationServices userNotificationServices) { InitializeComponent(); DataContext = this; DialogCaption = caption; MessageText = message; PreviewKeyDown += CloseOnESCkey; DontShowAgainCheckBox.Visibility = Visibility.Collapsed; if (checkboxText != null) { DontShowAgainCheckBox.Visibility = Visibility.Visible; CheckboxText = checkboxText; CheckboxState = initialStateOfCheckbox; } LearnMore.Visibility = Visibility.Collapsed; if (learnMoreText != null) { LearnMore.Visibility = Visibility.Visible; LearnMoreText = learnMoreText; LearnMoreCommand = new DelegateCommand(_ => { try { Process.Start(learnMoreUrl); } catch (Exception ex) { userNotificationServices.ShowError(ex.Message); } }); } }
public DialogServices(IProjectThreadingService threadHandling, IUserNotificationServices userNotificationServices) { _threadHandling = threadHandling; _userNotificationServices = userNotificationServices; }
public DiscussionController() { _discussionServices = DependencyResolver.Current.GetService<IUserPortalDiscussionServices>(); _userNotificationServices = DependencyResolver.Current.GetService<IUserNotificationServices>(); }
internal async Task RenameAsync(string sourceCode, string oldFilePath, string newFilePath, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, string language) { using var ws = new AdhocWorkspace(); var projectId = ProjectId.CreateNewId(); Solution solution = ws.AddSolution(InitializeWorkspace(projectId, newFilePath, sourceCode, language)); Project project = (from d in solution.Projects where d.Id == projectId select d).FirstOrDefault(); var unconfiguredProject = UnconfiguredProjectFactory.Create(filePath: $@"C:\project1.{ProjectFileExtension}"); var projectServices = IUnconfiguredProjectVsServicesFactory.Implement( threadingServiceCreator: () => IProjectThreadingServiceFactory.Create(), unconfiguredProjectCreator: () => unconfiguredProject); var unconfiguredProjectTasksService = IUnconfiguredProjectTasksServiceFactory.Create(); var environmentOptionsFactory = IEnvironmentOptionsFactory.Implement((string category, string page, string property, bool defaultValue) => { return(true); }); var waitIndicator = (new Mock <IWaitIndicator>()).Object; var refactorNotifyService = (new Mock <IRefactorNotifyService>()).Object; var dte = IVsServiceFactory.Create <Shell.Interop.SDTE, EnvDTE.DTE>(null !); var renamer = new Renamer(projectServices, unconfiguredProjectTasksService, ws, dte, environmentOptionsFactory, userNotificationServices, roslynServices, waitIndicator, refactorNotifyService); await renamer.HandleRenameAsync(oldFilePath, newFilePath) .TimeoutAfter(TimeSpan.FromSeconds(1)); }
private async Task RenameAsync(string soureCode, string oldFilePath, string newFilePath, IUserNotificationServices userNotificationServices, IRoslynServices roslynServices, string language) { using (var ws = new AdhocWorkspace()) { var projectId = ProjectId.CreateNewId(); Solution solution = ws.AddSolution(InitializeWorkspace(projectId, newFilePath, soureCode, language)); Project project = (from d in solution.Projects where d.Id == projectId select d).FirstOrDefault(); var environmentOptionsFactory = IEnvironmentOptionsFactory.Implement((string category, string page, string property, bool defaultValue) => { return(true); }); var renamer = new Renamer(ws, IProjectThreadingServiceFactory.Create(), userNotificationServices, environmentOptionsFactory, roslynServices, project, oldFilePath, newFilePath); await renamer.RenameAsync(project); } }
public AbstractRenameStrategy(IProjectThreadingService threadingService, IUserNotificationServices userNotificationService, IOptionsSettings optionsSettings) { _threadingService = threadingService; _userNotificationServices = userNotificationService; _optionsSettings = optionsSettings; }
public DialogServices(IUserNotificationServices userNotificationServices) { _userNotificationServices = userNotificationServices; }
public SimpleRenameStrategy(IProjectThreadingService threadingService, IUserNotificationServices userNotificationService, IOptionsSettings optionsSettings, IRoslynServices roslynServices) : base(threadingService, userNotificationService, optionsSettings) { _roslynServices = roslynServices; }