mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 20:38:24 +02:00
28 lines
667 B
C#
28 lines
667 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace MediaBrowser.ServerApplication.IO
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|