From 5bb864a0c4e0d38db10a4c844a9ace1a46ac7b4b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 11 Nov 2016 00:23:15 -0500 Subject: move class to new core project --- Emby.Server.Core/Emby.Server.Core.xproj | 7 ++++--- Emby.Server.Core/StartupOptions.cs | 28 ++++++++++++++++++++++++++++ Emby.Server.Core/project.json | 10 +++++++--- 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 Emby.Server.Core/StartupOptions.cs (limited to 'Emby.Server.Core') diff --git a/Emby.Server.Core/Emby.Server.Core.xproj b/Emby.Server.Core/Emby.Server.Core.xproj index f7f252dfba..704e84d266 100644 --- a/Emby.Server.Core/Emby.Server.Core.xproj +++ b/Emby.Server.Core/Emby.Server.Core.xproj @@ -4,7 +4,6 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - 65aa7d67-8059-40cd-91f1-16d02687226c @@ -13,9 +12,11 @@ .\bin\ v4.5.2 - 2.0 + + + - + \ No newline at end of file diff --git a/Emby.Server.Core/StartupOptions.cs b/Emby.Server.Core/StartupOptions.cs new file mode 100644 index 0000000000..5da42394d5 --- /dev/null +++ b/Emby.Server.Core/StartupOptions.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Emby.Server.Core +{ + public class StartupOptions + { + private readonly List _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; + } + } +} diff --git a/Emby.Server.Core/project.json b/Emby.Server.Core/project.json index 94ca05af05..678026745d 100644 --- a/Emby.Server.Core/project.json +++ b/Emby.Server.Core/project.json @@ -1,4 +1,4 @@ -{ +{ "version": "1.0.0-*", "dependencies": { @@ -11,14 +11,18 @@ }, "dependencies": { - + "MediaBrowser.Model": { + "target": "project" + } } }, "netstandard1.6": { "imports": "dnxcore50", "dependencies": { "NETStandard.Library": "1.6.0", - + "MediaBrowser.Model": { + "target": "project" + } } } } -- cgit v1.2.3