refactor: Removing preprocessors and adding better multi-platform support

This commit is contained in:
Drew Tingen
2019-01-22 09:47:20 -08:00
parent 3a4438ec1e
commit 1d7ada87c5
2 changed files with 5 additions and 5 deletions

View File

@@ -19,17 +19,18 @@ namespace ICD.Common.Utils.IO
#endif
}
#if SIMPLSHARP
/// <summary>
/// This gets the application root directory for Crestron systems
/// </summary>
/// <returns></returns>
public static string GetApplicationRootDirectory()
{
#if SIMPLSHARP
return Directory.GetApplicationRootDirectory();
}
#else
return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
#endif
}
public static bool Exists(string path)
{

View File

@@ -20,10 +20,9 @@ namespace ICD.Common.Utils
public static string RootPath {
get
{
#if SIMPLSHARP
if (IcdEnvironment.RuntimeEnvironment == IcdEnvironment.eRuntimeEnvironment.SimplSharpProMono)
return IcdDirectory.GetApplicationRootDirectory();
#endif
return IcdDirectory.GetDirectoryRoot(IcdPath.DirectorySeparatorChar.ToString());
}
}