You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Emby.Server.Core
|
|
|
|
|
{
|
|
|
|
|
public class StartupOptions
|
|
|
|
|
{
|
|
|
|
|
private readonly List<string> _options = Environment.GetCommandLineArgs().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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|