Skip to content

Commit 37cf645

Browse files
committed
Reverted changes based on IDE analyzer adjustments.
1 parent 377ec0a commit 37cf645

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Cli/Microsoft.DotNet.Cli.Utils/Extensions/MSBuildProjectExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static ISet<string> ConditionChain(this ProjectElement projectElement)
4747

4848
public static ProjectItemGroupElement FindUniformOrCreateItemGroupWithCondition(this ProjectRootElement root, string projectItemElementType, string framework)
4949
{
50-
var lastMatchingItemGroup = root.FindExistingUniformItemGroupWithCondition(projectItemElementType, framework);
50+
var lastMatchingItemGroup = FindExistingUniformItemGroupWithCondition(root, projectItemElementType, framework);
5151

5252
if (lastMatchingItemGroup != null)
5353
{

src/Cli/dotnet/Extensions/OptionForwardingExtensions.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace Microsoft.DotNet.Cli.Extensions
99
{
1010
public static class OptionForwardingExtensions
1111
{
12-
public static ForwardedOption<T> Forward<T>(this ForwardedOption<T> option) => option.SetForwardingFunction((o) => new string[] { option.Name });
12+
public static ForwardedOption<T> Forward<T>(this ForwardedOption<T> option) => option.SetForwardingFunction((T o) => new string[] { option.Name });
1313

14-
public static ForwardedOption<T> ForwardAs<T>(this ForwardedOption<T> option, string value) => option.SetForwardingFunction((o) => new string[] { value });
14+
public static ForwardedOption<T> ForwardAs<T>(this ForwardedOption<T> option, string value) => option.SetForwardingFunction((T o) => new string[] { value });
1515

1616
public static ForwardedOption<T> ForwardAsSingle<T>(this ForwardedOption<T> option, Func<T, string> format) => option.SetForwardingFunction(format);
1717

@@ -24,7 +24,7 @@ public static class OptionForwardingExtensions
2424
/// <returns>The option</returns>
2525
public static ForwardedOption<string> ForwardAsOutputPath(this ForwardedOption<string> option, string outputPropertyName, bool surroundWithDoubleQuotes = false)
2626
{
27-
return option.SetForwardingFunction((o) =>
27+
return option.SetForwardingFunction((string o) =>
2828
{
2929
string argVal = CommandDirectoryContext.GetFullPath(o);
3030
if (surroundWithDoubleQuotes)
@@ -136,13 +136,13 @@ public ForwardedOption<T> SetForwardingFunction(Func<T, string> format)
136136

137137
public ForwardedOption<T> SetForwardingFunction(Func<T, ParseResult, IEnumerable<string>> func)
138138
{
139-
ForwardingFunction = (parseResult) => parseResult.GetResult(this) is not null ? func(parseResult.GetValue(this), parseResult) : Array.Empty<string>();
139+
ForwardingFunction = (ParseResult parseResult) => parseResult.GetResult(this) is not null ? func(parseResult.GetValue<T>(this), parseResult) : Array.Empty<string>();
140140
return this;
141141
}
142142

143143
public Func<ParseResult, IEnumerable<string>> GetForwardingFunction(Func<T, IEnumerable<string>> func)
144144
{
145-
return (parseResult) => parseResult.GetResult(this) is not null ? func(parseResult.GetValue(this)) : Array.Empty<string>();
145+
return (ParseResult parseResult) => parseResult.GetResult(this) is not null ? func(parseResult.GetValue<T>(this)) : Array.Empty<string>();
146146
}
147147

148148
public Func<ParseResult, IEnumerable<string>> GetForwardingFunction()

src/Cli/dotnet/Extensions/ParseResultExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static bool CanBeInvoked(this ParseResult parseResult)
103103
{
104104
return GetBuiltInCommand(parseResult.RootSubCommandResult()) != null ||
105105
parseResult.Tokens.Any(token => token.Type == CliTokenType.Directive) ||
106-
parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(DotnetSubCommand));
106+
(parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(DotnetSubCommand)));
107107
}
108108

109109
public static int HandleMissingCommand(this ParseResult parseResult)

0 commit comments

Comments
 (0)