File tree Expand file tree Collapse file tree 1 file changed +4
-36
lines changed
Rubberduck.VBEEditor/Events Expand file tree Collapse file tree 1 file changed +4
-36
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using Rubberduck . VBEditor . ComManagement ;
3
- using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
4
2
5
3
namespace Rubberduck . VBEditor . Events
6
4
{
7
5
public class ComponentEventArgs : EventArgs
8
6
{
9
- private readonly QualifiedModuleName _qmn ;
10
-
11
- public ComponentEventArgs ( QualifiedModuleName qmn )
7
+ public ComponentEventArgs ( QualifiedModuleName qualifiedModuleName )
12
8
{
13
- _qmn = qmn ;
9
+ QualifiedModuleName = qualifiedModuleName ;
14
10
}
15
11
16
- public string ProjectId => _qmn . ProjectId ;
17
- public QualifiedModuleName QualifiedModuleName => _qmn ;
18
-
19
- public bool TryGetProject ( IProjectsRepository repository , out IVBProject project )
20
- {
21
- try
22
- {
23
- project = repository . Project ( _qmn . ProjectId ) ;
24
- return true ;
25
- }
26
- catch
27
- {
28
- project = null ;
29
- return false ;
30
- }
31
- }
32
-
33
- public bool TryGetComponent ( IProjectsRepository repository , out IVBComponent component )
34
- {
35
- try
36
- {
37
- component = repository . Component ( _qmn ) ;
38
- return true ;
39
- }
40
- catch
41
- {
42
- component = null ;
43
- return false ;
44
- }
45
- }
12
+ public string ProjectId => QualifiedModuleName . ProjectId ;
13
+ public QualifiedModuleName QualifiedModuleName { get ; }
46
14
}
47
15
}
You can’t perform that action at this time.
0 commit comments