mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
Merge branch 'feat/ProgramDataPath' of Common/Utils into dev
This commit is contained in:
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- Added CultureInfo extensions for converting between 12 hour and 24 hour time formatting
|
- Added CultureInfo extensions for converting between 12 hour and 24 hour time formatting
|
||||||
- Added environment methods for setting the current date and time
|
- Added environment methods for setting the current date and time
|
||||||
- Added BinarySearch extension method for all IList types
|
- Added BinarySearch extension method for all IList types
|
||||||
|
- Added PathUtils methods to get ProgramData directory
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- The Root Config path in Net Standard will now be the ICD.Connect folder in the current environments ProgramData directory
|
- The Root Config path in Net Standard will now be the ICD.Connect folder in the current environments ProgramData directory
|
||||||
|
|||||||
@@ -85,6 +85,37 @@ namespace ICD.Common.Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the absolute path to the program data directory.
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
[PublicAPI]
|
||||||
|
public static string ProgramDataPath { get { return Join(RootConfigPath, ProgramDataDirectory); } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the name of the program data directory.
|
||||||
|
/// This directory contains runtime program data that should be retained through deployments.
|
||||||
|
/// </summary>
|
||||||
|
public static string ProgramDataDirectory
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
switch (IcdEnvironment.RuntimeEnvironment)
|
||||||
|
{
|
||||||
|
case IcdEnvironment.eRuntimeEnvironment.SimplSharp:
|
||||||
|
case IcdEnvironment.eRuntimeEnvironment.SimplSharpPro:
|
||||||
|
case IcdEnvironment.eRuntimeEnvironment.Standard:
|
||||||
|
return string.Format("Program{0:D2}Data", ProgramUtils.ProgramNumber);
|
||||||
|
|
||||||
|
case IcdEnvironment.eRuntimeEnvironment.SimplSharpProMono:
|
||||||
|
return "ProgramData";
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the absolute path to the common configuration directory.
|
/// Returns the absolute path to the common configuration directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user