move class to new core project

This commit is contained in:
Luke Pulverenti
2016-11-11 00:23:15 -05:00
parent d55535fe43
commit 5bb864a0c4
13 changed files with 28 additions and 11 deletions

View File

@@ -0,0 +1,28 @@
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;
}
}
}