Skip to content

Commit d4353b7

Browse files
author
Kapil Borle
committed
Change IsTrue method name to GetValue
1 parent b418142 commit d4353b7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Engine/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static NamedAttributeArgumentAst GetSupportsShouldProcessAst(this Attribu
118118
/// Return the boolean value of a named attribute argument.
119119
/// </summary>
120120
/// <param name="argumentAst">The ast of the argument's value</param>
121-
public static bool IsTrue(this NamedAttributeArgumentAst attrAst, out ExpressionAst argumentAst)
121+
public static bool GetValue(this NamedAttributeArgumentAst attrAst, out ExpressionAst argumentAst)
122122
{
123123
argumentAst = null;
124124
if (attrAst.ExpressionOmitted)

Tests/Engine/Extensions.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Describe "NamedAttributeArgumentAst" {
145145
param($param1, $param2)
146146
}}.Ast.EndBlock.Statements[0].Body.ParamBlock.Attributes[0].NamedArguments[0]
147147
$expressionAst = $null
148-
$extNamespace::IsTrue($attrAst, [ref]$expressionAst) | Should Be $true
148+
$extNamespace::GetValue($attrAst, [ref]$expressionAst) | Should Be $true
149149
$expressionAst | Should Be $null
150150
}
151151

@@ -156,7 +156,7 @@ Describe "NamedAttributeArgumentAst" {
156156
param($param1, $param2)
157157
}}.Ast.EndBlock.Statements[0].Body.ParamBlock.Attributes[0].NamedArguments[0]
158158
$expressionAst = $null
159-
$extNamespace::IsTrue($attrAst, [ref]$expressionAst) | Should Be $true
159+
$extNamespace::GetValue($attrAst, [ref]$expressionAst) | Should Be $true
160160
$expressionAst | Should Not Be $null
161161
}
162162

@@ -167,7 +167,7 @@ Describe "NamedAttributeArgumentAst" {
167167
param($param1, $param2)
168168
}}.Ast.EndBlock.Statements[0].Body.ParamBlock.Attributes[0].NamedArguments[0]
169169
$expressionAst = $null
170-
$extNamespace::IsTrue($attrAst, [ref]$expressionAst) | Should Be $false
170+
$extNamespace::GetValue($attrAst, [ref]$expressionAst) | Should Be $false
171171
$expressionAst | Should Not Be $null
172172

173173
}

rules/UseSupportsShouldProcess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private List<CorrectionExtent> GetCorrections(
141141
if (shouldProcessAst != null)
142142
{
143143
ExpressionAst argAst;
144-
if (!shouldProcessAst.IsTrue(out argAst)
144+
if (!shouldProcessAst.GetValue(out argAst)
145145
&& argAst != null)
146146
{
147147
// SupportsShouldProcess is set to something other than $true.

0 commit comments

Comments
 (0)