コード例 #1
0
 public void RunDeclarations(ITypeLibWrapper typeLib, IEnumerable <Declaration> declarations)
 {
     foreach (var declaration in declarations)
     {
         _typeLibsApi.ExecuteCode(typeLib, declaration.QualifiedModuleName.ComponentName,
                                  declaration.QualifiedName.MemberName);
     }
 }
コード例 #2
0
ファイル: TestMethod.cs プロジェクト: xxxmen/Rubberduck
        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);
        }
コード例 #3
0
ファイル: TestEngine.cs プロジェクト: xxxmen/Rubberduck
        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);
                        }
                    }
            }
        }