blob: 159c36248c331f1f3daf02a26bfd1e0586d0cd18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace Emby.Server.Implementations
{
public class StartupOptions
{
private readonly List<string> _options;
public StartupOptions(string[] commandLineArgs)
{
_options = commandLineArgs.ToList();
}
public bool ContainsOption(string option)
{
return _options.Contains(option, StringComparer.OrdinalIgnoreCase);
}
public string GetOption(string name)
{
var index = _options.IndexOf(name);
if (index != -1)
{
return _options.ElementAtOrDefault(index + 1);
}
return null;
}
}
}
|