/// <summary> /// Initializes a new instance of the <see cref="DevelopmentService"/> class. /// </summary> /// <param name="sccProvider">The SCC provider.</param> /// <param name="notificationService">The notification service.</param> /// <param name="sccHelper">The SCC helper.</param> public DevelopmentService(SccProviderService sccProvider, NotificationService notificationService, SccHelperService sccHelper) { this.sccProvider = sccProvider; this.notificationService = notificationService; this.sccHelper = sccHelper; this.sccProvider.OnRefresh += (s, e) => this.RefreshTfsStatus(e.ForceUpdate); }
/// <summary> /// Initializes a new instance of the <see cref="SccCommand"/> class. /// </summary> /// <param name="command">The command.</param> /// <param name="arguments">The arguments.</param> public SccCommand(string command, string arguments) { var sccHelper = BasicSccProvider.GetServiceEx<SccHelperService>(); this.notificationService = BasicSccProvider.GetServiceEx<NotificationService>(); this.StartInfo = new ProcessStartInfo(command, arguments); StartInfo.WorkingDirectory = sccHelper.GetWorkingDirectory(); // Hidden process - no window. StartInfo.UseShellExecute = false; StartInfo.CreateNoWindow = true; StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; StartInfo.LoadUserProfile = true; // We dont want to provide input this.StartInfo.RedirectStandardInput = true; // Send output to the pending changes window StartInfo.RedirectStandardOutput = true; StartInfo.RedirectStandardError = true; this.OutputDataReceived += (sender, args) => this.ReceiveOutput(args); this.ErrorDataReceived += (sender, args) => this.ReceiveOutput(args); }
/// <summary> /// Initializes a new instance of the <see cref="BuildNotificationLogger"/> class. /// </summary> /// <param name="notifications">The notifications.</param> public BuildNotificationLogger(NotificationService notifications) { this.notificationService = notifications; }