3
3
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4
4
//
5
5
6
+ using System ;
6
7
using System . Collections . Generic ;
7
8
using System . Management . Automation . Language ;
8
9
@@ -34,7 +35,7 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
34
35
{
35
36
Ast commandNameAst = commandAst . CommandElements [ 0 ] ;
36
37
if ( symbolRef . SymbolType . Equals ( SymbolType . Function ) &&
37
- commandNameAst . Extent . Text . Equals ( symbolRef . ScriptRegion . Text ) )
38
+ commandNameAst . Extent . Text . Equals ( symbolRef . ScriptRegion . Text , StringComparison . InvariantCultureIgnoreCase ) )
38
39
{
39
40
this . FoundReferences . Add ( new SymbolReference (
40
41
SymbolType . Function ,
@@ -65,7 +66,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
65
66
} ;
66
67
67
68
if ( symbolRef . SymbolType . Equals ( SymbolType . Function ) &&
68
- nameExtent . Text . Equals ( symbolRef . SymbolName ) )
69
+ nameExtent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
69
70
{
70
71
this . FoundReferences . Add ( new SymbolReference (
71
72
SymbolType . Function ,
@@ -83,7 +84,7 @@ public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst fun
83
84
public override AstVisitAction VisitCommandParameter ( CommandParameterAst commandParameterAst )
84
85
{
85
86
if ( symbolRef . SymbolType . Equals ( SymbolType . Parameter ) &&
86
- commandParameterAst . Extent . Text . Equals ( symbolRef . SymbolName ) )
87
+ commandParameterAst . Extent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
87
88
{
88
89
this . FoundReferences . Add ( new SymbolReference (
89
90
SymbolType . Parameter ,
@@ -101,7 +102,7 @@ public override AstVisitAction VisitCommandParameter(CommandParameterAst command
101
102
public override AstVisitAction VisitVariableExpression ( VariableExpressionAst variableExpressionAst )
102
103
{
103
104
if ( symbolRef . SymbolType . Equals ( SymbolType . Variable ) &&
104
- variableExpressionAst . Extent . Text . Equals ( symbolRef . SymbolName ) )
105
+ variableExpressionAst . Extent . Text . Equals ( symbolRef . SymbolName , StringComparison . InvariantCultureIgnoreCase ) )
105
106
{
106
107
this . FoundReferences . Add ( new SymbolReference (
107
108
SymbolType . Variable ,
0 commit comments