aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/StartupOptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/StartupOptions.cs')
-rw-r--r--Emby.Server.Implementations/StartupOptions.cs17
1 files changed, 7 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/StartupOptions.cs b/Emby.Server.Implementations/StartupOptions.cs
index 159c36248..2114d85bf 100644
--- a/Emby.Server.Implementations/StartupOptions.cs
+++ b/Emby.Server.Implementations/StartupOptions.cs
@@ -1,33 +1,30 @@
using System;
-using System.Collections.Generic;
using System.Linq;
namespace Emby.Server.Implementations
{
public class StartupOptions
{
- private readonly List<string> _options;
+ private readonly string[] _options;
public StartupOptions(string[] commandLineArgs)
{
- _options = commandLineArgs.ToList();
+ _options = commandLineArgs;
}
public bool ContainsOption(string option)
- {
- return _options.Contains(option, StringComparer.OrdinalIgnoreCase);
- }
+ => _options.Contains(option, StringComparer.OrdinalIgnoreCase);
public string GetOption(string name)
{
- var index = _options.IndexOf(name);
+ int index = Array.IndexOf(_options, name);
- if (index != -1)
+ if (index == -1)
{
- return _options.ElementAtOrDefault(index + 1);
+ return null;
}
- return null;
+ return _options.ElementAtOrDefault(index + 1);
}
}
}