diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2018-10-07 01:50:05 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2018-10-07 02:20:18 +0300 |
commit | 0c1ac9c489de2a8a36641da234a5a28865348b4a (patch) | |
tree | 1d0836ebcc104b956dba4e29306670b18ab8fcf7 /Duplicati/WindowsService | |
parent | 439e319061bb121a5c67b7d51f8ac79d7115f262 (diff) |
Replace chained LINQ calls with call to overload with predicate.
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
Diffstat (limited to 'Duplicati/WindowsService')
-rw-r--r-- | Duplicati/WindowsService/Program.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Duplicati/WindowsService/Program.cs b/Duplicati/WindowsService/Program.cs index a8ce33292..f355362a9 100644 --- a/Duplicati/WindowsService/Program.cs +++ b/Duplicati/WindowsService/Program.cs @@ -19,9 +19,9 @@ namespace Duplicati.WindowsService public static void RealMain(string[] args)
{
- var install = args != null && args.Where(x => string.Equals("install", x, StringComparison.OrdinalIgnoreCase)).Any();
- var uninstall = args != null && args.Where(x => string.Equals("uninstall", x, StringComparison.OrdinalIgnoreCase)).Any();
- var help = args != null && args.Where(x => string.Equals("help", x, StringComparison.OrdinalIgnoreCase)).Any();
+ var install = args != null && args.Any(x => string.Equals("install", x, StringComparison.OrdinalIgnoreCase));
+ var uninstall = args != null && args.Any(x => string.Equals("uninstall", x, StringComparison.OrdinalIgnoreCase));
+ var help = args != null && args.Any(x => string.Equals("help", x, StringComparison.OrdinalIgnoreCase));
if (help)
{
|