private int OnNotifyTestFileAddRemove( int changedProjectCount, IVsProject[] changedProjects, string[] changedProjectItems, int[] rgFirstIndices, TestFileChangedReason reason) { int projItemIndex = 0; for (int changeProjIndex = 0; changeProjIndex < changedProjectCount; changeProjIndex++) { int endProjectIndex = ((changeProjIndex + 1) == changedProjectCount) ? changedProjectItems.Length : rgFirstIndices[changeProjIndex + 1]; for (; projItemIndex < endProjectIndex; projItemIndex++) { if (changedProjects[changeProjIndex] != null && TestFileChanged != null) { TestFileChanged(this, new TestFileChangedEventArgs( changedProjectItems[projItemIndex], reason)); } } } return(VSConstants.S_OK); }
private int OnNotifyTestFileAddRemove(int changedProjectCount, IVsProject[] changedProjects, string[] changedProjectItems, int[] rgFirstIndices, TestFileChangedReason reason) { // The way these parameters work is: // rgFirstIndices contains a list of the starting index into the changeProjectItems array for each project listed in the changedProjects list // Example: if you get two projects, then rgFirstIndices should have two elements, the first element is probably zero since rgFirstIndices would start at zero. // Then item two in the rgFirstIndices array is where in the changeProjectItems list that the second project's changed items reside. int projItemIndex = 0; for (int changeProjIndex = 0; changeProjIndex < changedProjectCount; changeProjIndex++) { int endProjectIndex = ((changeProjIndex + 1) == changedProjectCount) ? changedProjectItems.Length : rgFirstIndices[changeProjIndex + 1]; for (; projItemIndex < endProjectIndex; projItemIndex++) { if (changedProjects[changeProjIndex] != null && TestFileChanged != null) { TestFileChanged(this, new TestFileChangedEventArgs(changedProjectItems[projItemIndex], reason)); } } } return(VSConstants.S_OK); }
public TestFileChangedEventArgs(IVsProject project, string file, TestFileChangedReason reason, string oldFile = default) { Project = project; File = file; ChangedReason = reason; OldFile = oldFile; }
private int OnNotifyTestFileAddRemove(int changedProjectCount, IVsProject[] changedProjects, string[] changedProjectItems, int[] rgFirstIndices, TestFileChangedReason reason) { // The way these parameters work is: // rgFirstIndices contains a list of the starting index into the changeProjectItems array for each project listed in the changedProjects list // Example: if you get two projects, then rgFirstIndices should have two elements, the first element is probably zero since rgFirstIndices would start at zero. // Then item two in the rgFirstIndices array is where in the changeProjectItems list that the second project's changed items reside. int projItemIndex = 0; for (int changeProjIndex = 0; changeProjIndex < changedProjectCount; changeProjIndex++) { int endProjectIndex = ((changeProjIndex + 1) == changedProjectCount) ? changedProjectItems.Length : rgFirstIndices[changeProjIndex + 1]; for (; projItemIndex < endProjectIndex; projItemIndex++) { if (changedProjects[changeProjIndex] != null && TestFileChanged != null) { TestFileChanged(this, new TestFileChangedEventArgs(changedProjectItems[projItemIndex], reason)); } } } return VSConstants.S_OK; }
private int NotifyTestFileAddRemove(int changedProjectCount, IVsProject[] changedProjects, string[] changedProjectItems, int[] rgFirstIndices, TestFileChangedReason reason) { for (int index = 0; index < changedProjectCount; index++) { var projectItem = changedProjectItems[index]; var projectIndex = rgFirstIndices[index]; var project = changedProjects[projectIndex]; if (project != null && project.IsTestProject(_testProjectGuid)) { var evt = TestFileChanged; if (evt != null) { evt(this, new TestFileChangedEventArgs(project, projectItem, reason)); } } } return VSConstants.S_OK; }
public TestFileChangedEventArgs(string file, TestFileChangedReason reason) { File = file; ChangedReason = reason; }
private int NotifyTestFileAddRemove(int changedProjectCount, IVsProject[] changedProjects, string[] changedProjectItems, int[] rgFirstIndices, TestFileChangedReason reason) { for (int index = 0; index < changedProjectCount; index++) { var projectItem = changedProjectItems[index]; var projectIndex = rgFirstIndices[index]; var project = changedProjects[projectIndex]; if (project != null) //&& project.IsTestProject(_testProjectGuid)) { { var evt = TestFileChanged; if (evt != null) { evt(this, new TestFileChangedEventArgs(project, projectItem, reason)); } } } return(VSConstants.S_OK); }
public TestFileChangedEventArgs(IVsProject project, string file, TestFileChangedReason reason) { Project = project; File = file; ChangedReason = reason; }
public TestFileChangedEventArgs(string file, TestFileChangedReason reason) { File = new TestFileCandidate(file); ChangedReason = reason; }
public TestFileChangedEventArgs(IVsProject project, string file, TestFileChangedReason reason) { this.Project = project; this.File = file; this.ChangedReason = reason; }