/// <summary>Initializes a new instance of the <see cref="StopBuildCommand"/> class.</summary> /// <param name="buildAdapter">The build adapter.</param> /// <param name="buildInformation">The build information.</param> public StopBuildCommand(BuildAdapter buildAdapter, BuildInformation buildInformation) { buildExplorer = BuildExplorerFactory.CreateBuildExplorer(buildInformation.TfsVersion); buildAdapter.PropertyChanged += buildAdapter_PropertyChanged; this.buildAdapter = buildAdapter; this.buildInformation = buildInformation; }
public BuildExplorerWrapper(IBuildExplorer buildExplorer) { _buildExplorer = buildExplorer; _buildExplorerType = _buildExplorer.GetType(); _addBuildDefinitionMethod = new Lazy<MethodInfo>(() => _buildExplorerType.GetMethod("AddBuildDefinition", BindingFlags.Static | BindingFlags.Public)); _openControllerAgentManagerMethod = new Lazy<MethodInfo>(() => _buildExplorerType.GetMethod("OpenControllerAgentManager", BindingFlags.Static | BindingFlags.Public)); _openQualityManagerMethod = new Lazy<MethodInfo>(() => _buildExplorerType.GetMethod("OpenQualityManager", BindingFlags.Static | BindingFlags.Public)); _openBuildSecurityDialogMethod = new Lazy<MethodInfo>(() => _buildExplorerType.GetMethod("OpenBuildSecurityDialog", BindingFlags.Static | BindingFlags.Public)); _navigateToProcessFileMethod = new Lazy<MethodInfo>(() => _buildExplorerType.GetMethod("NavigateToProcessFile", BindingFlags.Static | BindingFlags.Public)); }
public BuildExplorerWrapper(IBuildExplorer buildExplorer) { _buildExplorer = buildExplorer; _buildExplorerType = _buildExplorer.GetType(); _addBuildDefinitionMethod = new Lazy <MethodInfo>(() => _buildExplorerType.GetMethod("AddBuildDefinition", BindingFlags.Static | BindingFlags.Public)); _openControllerAgentManagerMethod = new Lazy <MethodInfo>(() => _buildExplorerType.GetMethod("OpenControllerAgentManager", BindingFlags.Static | BindingFlags.Public)); _openQualityManagerMethod = new Lazy <MethodInfo>(() => _buildExplorerType.GetMethod("OpenQualityManager", BindingFlags.Static | BindingFlags.Public)); _openBuildSecurityDialogMethod = new Lazy <MethodInfo>(() => _buildExplorerType.GetMethod("OpenBuildSecurityDialog", BindingFlags.Static | BindingFlags.Public)); _navigateToProcessFileMethod = new Lazy <MethodInfo>(() => _buildExplorerType.GetMethod("NavigateToProcessFile", BindingFlags.Static | BindingFlags.Public)); }
/// <summary>Initializes a new instance of the <see cref="BuildAdapter"/> class.</summary> /// <param name="mainWindowViewModel">The main window view model.</param> /// <param name="buildInformation">The build information.</param> /// <param name="isPinedView">if set to <c>true</c> [is pined view].</param> internal BuildAdapter(MainWindowViewModel mainWindowViewModel, BuildInformation buildInformation, bool isPinedView) { BuildInformation = buildInformation; this.mainWindowViewModel = mainWindowViewModel; this.isPinedView = isPinedView; buildExplorer = BuildExplorerFactory.CreateBuildExplorer(buildInformation.TfsVersion); OpenBrowserCommand = new RelayCommand(OpenBrowser); StopBuildCommand = new StopBuildCommand(this, buildInformation); RequestBuildCommand = new RequestBuildCommand(this, buildInformation); RunningBuildErrorDetails = new ObservableCollection<string>(); Tags = new ObservableCollection<string>(buildInformation.Tags ?? new string[0]); if (!isPinedView) { PinBuildCommand = new PinBuildCommand(mainWindowViewModel, buildInformation); } var buildDefinition = MonitorSettingsContainer.BuildServers.SelectMany(x => x.BuildDefinitions).FirstOrDefault(x => x.Id == buildInformation.BuildDefinitionId); if (PinBuildCommand != null && buildDefinition != null && buildDefinition.IsPined) { PinBuildCommand.Execute(null); } }