Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 4df15d5

Browse files
author
Rodrigo Moya
committed
[AspNetCore] Simplify return code
1 parent 009a91c commit 4df15d5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore/AspNetCoreProjectExtension.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,9 @@ protected override IEnumerable<ExecutionTarget> OnGetExecutionTargets (Operation
195195
}
196196
}
197197

198-
if (result.Count > 0)
199-
yield return result;
200-
else {
201-
// Fallback to base implementation
202-
foreach (var target in base.OnGetExecutionTargets (ctx, configuration, runConfig)) {
203-
yield return target;
204-
}
205-
}
198+
return result.Count > 0
199+
? new ExecutionTarget [] { result }
200+
: base.OnGetExecutionTargets (ctx, configuration, runConfig);
206201
}
207202

208203
IEnumerable<ExecutionTarget> GetMultipleTargetFrameworkExecutionTargets (DesktopApplication browser)

0 commit comments

Comments
 (0)