File tree Expand file tree Collapse file tree 2 files changed +23
-32
lines changed Expand file tree Collapse file tree 2 files changed +23
-32
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public static bool HasMultipleDeclarationsInStatement(this Declaration target)
79
79
80
80
var statement = target . Context . Parent as VBAParser . VariableListStmtContext ;
81
81
82
- return statement != null && statement . children . OfType < VBAParser . VariableSubStmtContext > ( ) . Any ( ) ;
82
+ return statement != null && statement . children . OfType < VBAParser . VariableSubStmtContext > ( ) . Count ( ) > 1 ;
83
83
}
84
84
85
85
/// <summary>
Original file line number Diff line number Diff line change 1
1
using System . Collections . Generic ;
2
+ using System . Collections . ObjectModel ;
2
3
using System . Linq ;
3
4
using Rubberduck . Parsing . Grammar ;
4
5
using Rubberduck . Parsing . Symbols ;
@@ -24,40 +25,30 @@ public class ExtractInterfaceModel
24
25
public string InterfaceName { get ; set ; }
25
26
public List < InterfaceMember > Members { get ; set ; }
26
27
27
- private static DeclarationType [ ] DeclarationTypes
28
+ private static readonly DeclarationType [ ] _declarationTypes =
28
29
{
29
- get
30
- {
31
- return new [ ]
32
- {
33
- DeclarationType . Class ,
34
- DeclarationType . Document ,
35
- DeclarationType . UserForm
36
- } ;
37
- }
38
- }
30
+ DeclarationType . Class ,
31
+ DeclarationType . Document ,
32
+ DeclarationType . UserForm
33
+ } ;
34
+ public ReadOnlyCollection < DeclarationType > DeclarationTypes = new ReadOnlyCollection < DeclarationType > ( _declarationTypes ) ;
39
35
40
- public static string [ ] PrimitiveTypes
36
+ private static readonly string [ ] _primitiveTypes =
41
37
{
42
- get
43
- {
44
- return new [ ]
45
- {
46
- Tokens . Boolean ,
47
- Tokens . Byte ,
48
- Tokens . Date ,
49
- Tokens . Decimal ,
50
- Tokens . Double ,
51
- Tokens . Long ,
52
- Tokens . LongLong ,
53
- Tokens . LongPtr ,
54
- Tokens . Integer ,
55
- Tokens . Single ,
56
- Tokens . String ,
57
- Tokens . StrPtr
58
- } ;
59
- }
60
- }
38
+ Tokens . Boolean ,
39
+ Tokens . Byte ,
40
+ Tokens . Date ,
41
+ Tokens . Decimal ,
42
+ Tokens . Double ,
43
+ Tokens . Long ,
44
+ Tokens . LongLong ,
45
+ Tokens . LongPtr ,
46
+ Tokens . Integer ,
47
+ Tokens . Single ,
48
+ Tokens . String ,
49
+ Tokens . StrPtr
50
+ } ;
51
+ public ReadOnlyCollection < string > PrimitiveTypes = new ReadOnlyCollection < string > ( _primitiveTypes ) ;
61
52
62
53
public ExtractInterfaceModel ( RubberduckParserState parseResult , QualifiedSelection selection )
63
54
{
You can’t perform that action at this time.
0 commit comments