public PullRequestEditorService( IGitHubServiceProvider serviceProvider, IPullRequestService pullRequestService, IVsEditorAdaptersFactoryService vsEditorAdaptersFactory, IStatusBarNotificationService statusBar, IGoToSolutionOrPullRequestFileCommand goToSolutionOrPullRequestFileCommand, IEditorOptionsFactoryService editorOptionsFactoryService, IUsageTracker usageTracker) { Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider)); Guard.ArgumentNotNull(pullRequestService, nameof(pullRequestService)); Guard.ArgumentNotNull(vsEditorAdaptersFactory, nameof(vsEditorAdaptersFactory)); Guard.ArgumentNotNull(statusBar, nameof(statusBar)); Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(goToSolutionOrPullRequestFileCommand)); Guard.ArgumentNotNull(goToSolutionOrPullRequestFileCommand, nameof(editorOptionsFactoryService)); Guard.ArgumentNotNull(usageTracker, nameof(usageTracker)); this.serviceProvider = serviceProvider; this.pullRequestService = pullRequestService; this.vsEditorAdaptersFactory = vsEditorAdaptersFactory; this.statusBar = statusBar; this.goToSolutionOrPullRequestFileCommand = goToSolutionOrPullRequestFileCommand; this.editorOptionsFactoryService = editorOptionsFactoryService; this.usageTracker = usageTracker; }
public PullRequestDetailViewModel( IPullRequestService pullRequestsService, IPullRequestSessionManager sessionManager, IModelServiceFactory modelServiceFactory, IUsageTracker usageTracker, ITeamExplorerContext teamExplorerContext, IStatusBarNotificationService statusBarNotificationService) { Guard.ArgumentNotNull(pullRequestsService, nameof(pullRequestsService)); Guard.ArgumentNotNull(sessionManager, nameof(sessionManager)); Guard.ArgumentNotNull(modelServiceFactory, nameof(modelServiceFactory)); Guard.ArgumentNotNull(usageTracker, nameof(usageTracker)); Guard.ArgumentNotNull(teamExplorerContext, nameof(teamExplorerContext)); Guard.ArgumentNotNull(statusBarNotificationService, nameof(statusBarNotificationService)); this.pullRequestsService = pullRequestsService; this.sessionManager = sessionManager; this.modelServiceFactory = modelServiceFactory; this.usageTracker = usageTracker; this.teamExplorerContext = teamExplorerContext; this.statusBarNotificationService = statusBarNotificationService; Checkout = ReactiveCommand.CreateAsyncObservable( this.WhenAnyValue(x => x.CheckoutState) .Cast <CheckoutCommandState>() .Select(x => x != null && x.IsEnabled), DoCheckout); Checkout.IsExecuting.Subscribe(x => isInCheckout = x); SubscribeOperationError(Checkout); Pull = ReactiveCommand.CreateAsyncObservable( this.WhenAnyValue(x => x.UpdateState) .Cast <UpdateCommandState>() .Select(x => x != null && x.PullEnabled), DoPull); SubscribeOperationError(Pull); Push = ReactiveCommand.CreateAsyncObservable( this.WhenAnyValue(x => x.UpdateState) .Cast <UpdateCommandState>() .Select(x => x != null && x.PushEnabled), DoPush); SubscribeOperationError(Push); SyncSubmodules = ReactiveCommand.CreateAsyncTask( this.WhenAnyValue(x => x.UpdateState) .Cast <UpdateCommandState>() .Select(x => x != null && x.SyncSubmodulesEnabled), DoSyncSubmodules); SyncSubmodules.Subscribe(_ => Refresh().ToObservable()); SubscribeOperationError(SyncSubmodules); OpenOnGitHub = ReactiveCommand.Create(); DiffFile = ReactiveCommand.Create(); DiffFileWithWorkingDirectory = ReactiveCommand.Create(this.WhenAnyValue(x => x.IsCheckedOut)); OpenFileInWorkingDirectory = ReactiveCommand.Create(this.WhenAnyValue(x => x.IsCheckedOut)); ViewFile = ReactiveCommand.Create(); }
public PullRequestEditorService( IGitHubServiceProvider serviceProvider, IPullRequestService pullRequestService, IVsEditorAdaptersFactoryService vsEditorAdaptersFactory, IStatusBarNotificationService statusBar, IUsageTracker usageTracker) { Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider)); Guard.ArgumentNotNull(pullRequestService, nameof(pullRequestService)); Guard.ArgumentNotNull(vsEditorAdaptersFactory, nameof(vsEditorAdaptersFactory)); Guard.ArgumentNotNull(statusBar, nameof(statusBar)); Guard.ArgumentNotNull(usageTracker, nameof(usageTracker)); this.serviceProvider = serviceProvider; this.pullRequestService = pullRequestService; this.vsEditorAdaptersFactory = vsEditorAdaptersFactory; this.statusBar = statusBar; this.usageTracker = usageTracker; }
public BuildInformationProvider( [Import(typeof(IBuildOutputLogger))] IBuildOutputLogger buildOutputLogger, [Import(typeof(IStatusBarNotificationService))] IStatusBarNotificationService statusBarNotificationService, [Import(typeof(IBuildMessagesFactory))] IBuildMessagesFactory buildMessagesFactory, [Import(typeof(IWindowStateService))] IWindowStateService windowStateService, [Import(typeof(IPackageSettingsProvider))] IPackageSettingsProvider packageSettingsProvider, [Import(typeof(IErrorNavigationService))] IErrorNavigationService errorNavigationService, [Import(typeof(ISolutionProvider))] ISolutionProvider solutionProvider, [Import(typeof(IBuildService))] IBuildService buildService, [Import(typeof(ITaskBarInfoService))] ITaskBarInfoService taskBarInfoService) { _packageSettingsProvider = packageSettingsProvider; _errorNavigationService = errorNavigationService; _buildOutputLogger = buildOutputLogger; _statusBarNotificationService = statusBarNotificationService; _buildMessagesFactory = buildMessagesFactory; _windowStateService = windowStateService; _solutionProvider = solutionProvider; _buildService = buildService; _taskBarInfoService = taskBarInfoService; _buildOutputLogger.OnErrorRaised += BuildOutputLogger_OnErrorRaised; }