fix: Fixes command conditional comparisons (#2191)
This commit is contained in:
parent
972e7723ae
commit
f630ec2a2d
1 changed files with 7 additions and 42 deletions
|
|
@ -279,53 +279,25 @@ namespace Server.Commands.Generic
|
||||||
}
|
}
|
||||||
case StringOperator.Equal:
|
case StringOperator.Equal:
|
||||||
{
|
{
|
||||||
if (m_IgnoreCase)
|
methodName = m_IgnoreCase ? "InsensitiveEquals" : "EqualsOrdinal";
|
||||||
{
|
|
||||||
methodName = "InsensitiveEquals";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
methodName = "EqualsOrdinal";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case StringOperator.Contains:
|
case StringOperator.Contains:
|
||||||
{
|
{
|
||||||
if (m_IgnoreCase)
|
methodName = m_IgnoreCase ? "InsensitiveContains" : "ContainsOrdinal";
|
||||||
{
|
|
||||||
methodName = "InsensitiveContains";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
methodName = "ContainsOrdinal";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case StringOperator.StartsWith:
|
case StringOperator.StartsWith:
|
||||||
{
|
{
|
||||||
if (m_IgnoreCase)
|
methodName = m_IgnoreCase ? "InsensitiveStartsWith" : "StartsWithOrdinal";
|
||||||
{
|
|
||||||
methodName = "InsensitiveStartsWith";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
methodName = "StartsWithOrdinal";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case StringOperator.EndsWith:
|
case StringOperator.EndsWith:
|
||||||
{
|
{
|
||||||
if (m_IgnoreCase)
|
methodName = m_IgnoreCase ? "InsensitiveEndsWith" : "EndsWithOrdinal";
|
||||||
{
|
|
||||||
methodName = "InsensitiveEndsWith";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
methodName = "EndsWithOrdinal";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -342,11 +314,7 @@ namespace Server.Commands.Generic
|
||||||
methodName,
|
methodName,
|
||||||
BindingFlags.Public | BindingFlags.Static,
|
BindingFlags.Public | BindingFlags.Static,
|
||||||
null,
|
null,
|
||||||
new[]
|
[typeof(string), typeof(string)],
|
||||||
{
|
|
||||||
typeof(string),
|
|
||||||
typeof(string)
|
|
||||||
},
|
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -380,12 +348,9 @@ namespace Server.Commands.Generic
|
||||||
emitter.BeginCall(
|
emitter.BeginCall(
|
||||||
type.GetMethod(
|
type.GetMethod(
|
||||||
methodName,
|
methodName,
|
||||||
BindingFlags.Public | BindingFlags.Instance,
|
BindingFlags.Public | BindingFlags.Static,
|
||||||
null,
|
null,
|
||||||
new[]
|
[typeof(string), typeof(string)],
|
||||||
{
|
|
||||||
typeof(string)
|
|
||||||
},
|
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue