Skip to content

Commit 0f2351e

Browse files
committed
Remove unused functions and clarify the naming of new member
1 parent fc1b8b6 commit 0f2351e

File tree

1 file changed

+4
-36
lines changed

1 file changed

+4
-36
lines changed
Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,15 @@
11
using System;
2-
using Rubberduck.VBEditor.ComManagement;
3-
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
42

53
namespace Rubberduck.VBEditor.Events
64
{
75
public class ComponentEventArgs : EventArgs
86
{
9-
private readonly QualifiedModuleName _qmn;
10-
11-
public ComponentEventArgs(QualifiedModuleName qmn)
7+
public ComponentEventArgs(QualifiedModuleName qualifiedModuleName)
128
{
13-
_qmn = qmn;
9+
QualifiedModuleName = qualifiedModuleName;
1410
}
1511

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; }
4614
}
4715
}

0 commit comments

Comments
 (0)