mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
move classes to portable project
This commit is contained in:
33
Emby.Server.Implementations/StartupOptions.cs
Normal file
33
Emby.Server.Implementations/StartupOptions.cs
Normal file
@@ -0,0 +1,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user