public void RunDeclarations(ITypeLibWrapper typeLib, IEnumerable <Declaration> declarations) { foreach (var declaration in declarations) { _typeLibsApi.ExecuteCode(typeLib, declaration.QualifiedModuleName.ComponentName, declaration.QualifiedName.MemberName); } }
public void Run() { _assertResults.Clear(); //clear previous results to account for changes being made AssertCompletedEventArgs result; var duration = new TimeSpan(); var startTime = DateTime.Now; try { AssertHandler.OnAssertCompleted += HandleAssertCompleted; _typeLibApi.ExecuteCode(_vbe, Declaration.ProjectName, Declaration.QualifiedModuleName.ComponentName, Declaration.QualifiedName.MemberName); AssertHandler.OnAssertCompleted -= HandleAssertCompleted; result = EvaluateResults(); } catch (Exception exception) { result = new AssertCompletedEventArgs(TestOutcome.Inconclusive, "Test raised an error. " + exception.Message); } var endTime = DateTime.Now; UpdateResult(result.Outcome, result.Message, duration.Milliseconds, startTime, endTime); }
private void Run(IEnumerable <Declaration> members) { var groupedMembers = members.GroupBy(m => m.ProjectName); foreach (var group in groupedMembers) { using (var project = _vbe.VBProjects[group.Key]) using (var typeLib = TypeLibWrapper.FromVBProject(project)) { foreach (var member in group) { _typeLibApi.ExecuteCode(typeLib, member.QualifiedModuleName.ComponentName, member.QualifiedName.MemberName); } } } }