1 write to _methodMethodName
Microsoft.Build (1)
Evaluation\Expander.cs (1)
3283
_methodMethodName
= methodName;
110 references to _methodMethodName
Microsoft.Build (110)
Evaluation\Expander.cs (110)
3454
if (!IsStaticMethodAvailable(_receiverType,
_methodMethodName
))
3456
ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionMethodUnavailable",
_methodMethodName
, _receiverType.FullName);
3471
if (!IsInstanceMethodAvailable(
_methodMethodName
))
3473
ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionMethodUnavailable",
_methodMethodName
, _receiverType.FullName);
3525
if (objectInstance != null && args.Length == 1 && (String.Equals("Equals",
_methodMethodName
, StringComparison.OrdinalIgnoreCase) || String.Equals("CompareTo",
_methodMethodName
, StringComparison.OrdinalIgnoreCase)))
3544
if (
_methodMethodName
.Equals("GetPathOfFileAbove") && args.Length == 1)
3557
if (String.Equals("new",
_methodMethodName
, StringComparison.OrdinalIgnoreCase))
3583
string partiallyEvaluated = GenerateStringOfMethodExecuted(_expression, objectInstance,
_methodMethodName
, args);
3602
IEnumerable<MethodInfo> methods = _receiverType.GetMethods(_bindingFlags).Where(m => m.Name.Equals(
_methodMethodName
) && m.GetParameters().Length == args.Length);
3608
functionResult = _receiverType.InvokeMember(
_methodMethodName
, _bindingFlags, Type.DefaultBinder, objectInstance, args, CultureInfo.InvariantCulture);
3626
!String.Equals("Unescape",
_methodMethodName
, StringComparison.OrdinalIgnoreCase) &&
3627
!String.Equals("Escape",
_methodMethodName
, StringComparison.OrdinalIgnoreCase) &&
3628
!String.Equals("ConvertFromBase64",
_methodMethodName
, StringComparison.OrdinalIgnoreCase))
3654
string partiallyEvaluated = GenerateStringOfMethodExecuted(_expression, objectInstance,
_methodMethodName
, args);
3676
string partiallyEvaluated = GenerateStringOfMethodExecuted(_expression, objectInstance,
_methodMethodName
, args);
3690
if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.RegisterBuildCheck), StringComparison.OrdinalIgnoreCase))
3726
ErrorUtilities.ThrowArgument("CouldNotDifferentiateBetweenCompatibleMethods",
_methodMethodName
, args.Length);
3738
return _receiverType.InvokeMember(
_methodMethodName
, _bindingFlags, Type.DefaultBinder, objectInstance, args, CultureInfo.InvariantCulture) ?? "null";
3765
if (string.Equals(
_methodMethodName
, nameof(string.StartsWith), StringComparison.OrdinalIgnoreCase))
3773
else if (string.Equals(
_methodMethodName
, nameof(string.Replace), StringComparison.OrdinalIgnoreCase))
3781
else if (string.Equals(
_methodMethodName
, nameof(string.Contains), StringComparison.OrdinalIgnoreCase))
3789
else if (string.Equals(
_methodMethodName
, nameof(string.ToUpperInvariant), StringComparison.OrdinalIgnoreCase))
3797
else if (string.Equals(
_methodMethodName
, nameof(string.ToLowerInvariant), StringComparison.OrdinalIgnoreCase))
3805
else if (string.Equals(
_methodMethodName
, nameof(string.EndsWith), StringComparison.OrdinalIgnoreCase))
3813
else if (string.Equals(
_methodMethodName
, nameof(string.ToLower), StringComparison.OrdinalIgnoreCase))
3821
else if (string.Equals(
_methodMethodName
, nameof(string.IndexOf), StringComparison.OrdinalIgnoreCase))
3829
else if (string.Equals(
_methodMethodName
, nameof(string.IndexOfAny), StringComparison.OrdinalIgnoreCase))
3837
else if (string.Equals(
_methodMethodName
, nameof(string.LastIndexOf), StringComparison.OrdinalIgnoreCase))
3855
else if (string.Equals(
_methodMethodName
, nameof(string.LastIndexOfAny), StringComparison.OrdinalIgnoreCase))
3863
else if (string.Equals(
_methodMethodName
, nameof(string.Length), StringComparison.OrdinalIgnoreCase))
3871
else if (string.Equals(
_methodMethodName
, nameof(string.Substring), StringComparison.OrdinalIgnoreCase))
3884
else if (string.Equals(
_methodMethodName
, nameof(string.Split), StringComparison.OrdinalIgnoreCase))
3892
else if (string.Equals(
_methodMethodName
, nameof(string.PadLeft), StringComparison.OrdinalIgnoreCase))
3905
else if (string.Equals(
_methodMethodName
, nameof(string.PadRight), StringComparison.OrdinalIgnoreCase))
3918
else if (string.Equals(
_methodMethodName
, nameof(string.TrimStart), StringComparison.OrdinalIgnoreCase))
3926
else if (string.Equals(
_methodMethodName
, nameof(string.TrimEnd), StringComparison.OrdinalIgnoreCase))
3934
else if (string.Equals(
_methodMethodName
, "get_Chars", StringComparison.OrdinalIgnoreCase))
3942
else if (string.Equals(
_methodMethodName
, nameof(string.Equals), StringComparison.OrdinalIgnoreCase))
3953
if (string.Equals(
_methodMethodName
, "GetValue", StringComparison.OrdinalIgnoreCase))
3966
if (string.Equals(
_methodMethodName
, nameof(string.IsNullOrWhiteSpace), StringComparison.OrdinalIgnoreCase))
3974
else if (string.Equals(
_methodMethodName
, nameof(string.IsNullOrEmpty), StringComparison.OrdinalIgnoreCase))
3982
else if (string.Equals(
_methodMethodName
, nameof(string.Copy), StringComparison.OrdinalIgnoreCase))
3993
if (string.Equals(
_methodMethodName
, nameof(Math.Max), StringComparison.OrdinalIgnoreCase))
4001
else if (string.Equals(
_methodMethodName
, nameof(Math.Min), StringComparison.OrdinalIgnoreCase))
4012
if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.EnsureTrailingSlash), StringComparison.OrdinalIgnoreCase))
4020
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.ValueOrDefault), StringComparison.OrdinalIgnoreCase))
4028
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.NormalizePath), StringComparison.OrdinalIgnoreCase))
4036
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetDirectoryNameOfFileAbove), StringComparison.OrdinalIgnoreCase))
4044
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetRegistryValueFromView), StringComparison.OrdinalIgnoreCase))
4053
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.IsRunningFromVisualStudio), StringComparison.OrdinalIgnoreCase))
4061
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Escape), StringComparison.OrdinalIgnoreCase))
4069
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Unescape), StringComparison.OrdinalIgnoreCase))
4077
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetPathOfFileAbove), StringComparison.OrdinalIgnoreCase))
4085
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Add), StringComparison.OrdinalIgnoreCase))
4092
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Subtract), StringComparison.OrdinalIgnoreCase))
4099
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Multiply), StringComparison.OrdinalIgnoreCase))
4106
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Divide), StringComparison.OrdinalIgnoreCase))
4113
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.Modulo), StringComparison.OrdinalIgnoreCase))
4120
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetCurrentToolsDirectory), StringComparison.OrdinalIgnoreCase))
4128
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetToolsDirectory32), StringComparison.OrdinalIgnoreCase))
4136
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetToolsDirectory64), StringComparison.OrdinalIgnoreCase))
4144
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetMSBuildSDKsPath), StringComparison.OrdinalIgnoreCase))
4152
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetVsInstallRoot), StringComparison.OrdinalIgnoreCase))
4160
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetMSBuildExtensionsPath), StringComparison.OrdinalIgnoreCase))
4168
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetProgramFiles32), StringComparison.OrdinalIgnoreCase))
4176
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionEquals), StringComparison.OrdinalIgnoreCase))
4184
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionNotEquals), StringComparison.OrdinalIgnoreCase))
4192
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionGreaterThan), StringComparison.OrdinalIgnoreCase))
4200
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionGreaterThanOrEquals), StringComparison.OrdinalIgnoreCase))
4208
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionLessThan), StringComparison.OrdinalIgnoreCase))
4216
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.VersionLessThanOrEquals), StringComparison.OrdinalIgnoreCase))
4224
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetTargetFrameworkIdentifier), StringComparison.OrdinalIgnoreCase))
4232
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetTargetFrameworkVersion), StringComparison.OrdinalIgnoreCase))
4245
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.IsTargetFrameworkCompatible), StringComparison.OrdinalIgnoreCase))
4253
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetTargetPlatformIdentifier), StringComparison.OrdinalIgnoreCase))
4261
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.GetTargetPlatformVersion), StringComparison.OrdinalIgnoreCase))
4274
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.ConvertToBase64), StringComparison.OrdinalIgnoreCase))
4282
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.ConvertFromBase64), StringComparison.OrdinalIgnoreCase))
4290
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.StableStringHash), StringComparison.OrdinalIgnoreCase))
4306
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.AreFeaturesEnabled), StringComparison.OrdinalIgnoreCase))
4314
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.SubstringByAsciiChars), StringComparison.OrdinalIgnoreCase))
4322
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.CheckFeatureAvailability), StringComparison.OrdinalIgnoreCase))
4330
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.BitwiseOr), StringComparison.OrdinalIgnoreCase))
4338
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.BitwiseAnd), StringComparison.OrdinalIgnoreCase))
4346
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.BitwiseXor), StringComparison.OrdinalIgnoreCase))
4354
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.BitwiseNot), StringComparison.OrdinalIgnoreCase))
4362
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.LeftShift), StringComparison.OrdinalIgnoreCase))
4370
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.RightShift), StringComparison.OrdinalIgnoreCase))
4378
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.RightShiftUnsigned), StringComparison.OrdinalIgnoreCase))
4386
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.NormalizeDirectory), StringComparison.OrdinalIgnoreCase))
4394
else if (string.Equals(
_methodMethodName
, nameof(IntrinsicFunctions.IsOSPlatform), StringComparison.OrdinalIgnoreCase))
4405
if (string.Equals(
_methodMethodName
, nameof(Path.Combine), StringComparison.OrdinalIgnoreCase))
4451
else if (string.Equals(
_methodMethodName
, nameof(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase))
4459
else if (string.Equals(
_methodMethodName
, nameof(Path.GetFullPath), StringComparison.OrdinalIgnoreCase))
4467
else if (string.Equals(
_methodMethodName
, nameof(Path.IsPathRooted), StringComparison.OrdinalIgnoreCase))
4475
else if (string.Equals(
_methodMethodName
, nameof(Path.GetTempPath), StringComparison.OrdinalIgnoreCase))
4483
else if (string.Equals(
_methodMethodName
, nameof(Path.GetFileName), StringComparison.OrdinalIgnoreCase))
4491
else if (string.Equals(
_methodMethodName
, nameof(Path.GetDirectoryName), StringComparison.OrdinalIgnoreCase))
4499
else if (string.Equals(
_methodMethodName
, nameof(Path.GetFileNameWithoutExtension), StringComparison.OrdinalIgnoreCase))
4510
if (string.Equals(
_methodMethodName
, nameof(Version.Parse), StringComparison.OrdinalIgnoreCase))
4521
if (string.Equals(
_methodMethodName
, nameof(Guid.NewGuid), StringComparison.OrdinalIgnoreCase))
4530
else if (string.Equals(
_methodMethodName
, nameof(Regex.Replace), StringComparison.OrdinalIgnoreCase) && args.Length == 3)
4539
else if (string.Equals(
_methodMethodName
, nameof(Version.ToString), StringComparison.OrdinalIgnoreCase) && objectInstance is Version v)
4547
else if (string.Equals(
_methodMethodName
, nameof(Int32.ToString), StringComparison.OrdinalIgnoreCase) && objectInstance is int i)
5019
File.AppendAllText(logFile, $"ReceiverType={_receiverType?.FullName}; ObjectInstanceType={objectInstance?.GetType().FullName}; MethodName={
_methodMethodName
}({argSignature})\n");
5536
memberInfo = _receiverType.GetMethod(
_methodMethodName
, bindingFlags, null, types, null);
5549
else if (_receiverType == typeof(IntrinsicFunctions) && IntrinsicFunctionOverload.IsKnownOverloadMethodName(
_methodMethodName
))
5555
_methodMethodName
);
5561
members = _receiverType.GetMethods(bindingFlags).Where(m => string.Equals(m.Name,
_methodMethodName
, StringComparison.OrdinalIgnoreCase));