mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix CHD parsing, threading, version
This commit is contained in:
@@ -12,7 +12,7 @@ namespace SabreTools.Library.Data
|
||||
/// <summary>
|
||||
/// The current toolset version to be used by all child applications
|
||||
/// </summary>
|
||||
public readonly static string Version = $"v1.0.0-{File.GetCreationTime(Assembly.GetExecutingAssembly().Location):yyyy-MM-dd HH:mm:ss}";
|
||||
public readonly static string Version = $"v1.0.1-{File.GetCreationTime(Assembly.GetExecutingAssembly().Location):yyyy-MM-dd HH:mm:ss}";
|
||||
public const int HeaderHeight = 3;
|
||||
|
||||
#region 0-byte file constants
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace SabreTools.Library.Data
|
||||
#region Private implementations
|
||||
|
||||
private static Logger _logger = null;
|
||||
private static int _maxDegreeOfParallelism = System.Environment.ProcessorCount;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -33,37 +32,18 @@ namespace SabreTools.Library.Data
|
||||
set { _logger = value; }
|
||||
}
|
||||
|
||||
public static int MaxThreads
|
||||
{
|
||||
get { return _maxDegreeOfParallelism; }
|
||||
set { _maxDegreeOfParallelism = value; }
|
||||
}
|
||||
public static int MaxThreads { get; set; } = Environment.ProcessorCount;
|
||||
|
||||
public static ParallelOptions ParallelOptions
|
||||
public static ParallelOptions ParallelOptions => new ParallelOptions()
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ParallelOptions()
|
||||
{
|
||||
MaxDegreeOfParallelism = _maxDegreeOfParallelism
|
||||
};
|
||||
}
|
||||
}
|
||||
MaxDegreeOfParallelism = MaxThreads
|
||||
};
|
||||
|
||||
public static string ExeName
|
||||
{
|
||||
get { return new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath; }
|
||||
}
|
||||
public static string ExeName => new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath;
|
||||
|
||||
public static string ExeDir
|
||||
{
|
||||
get { return Path.GetDirectoryName(ExeName); }
|
||||
}
|
||||
public static string ExeDir => Path.GetDirectoryName(ExeName);
|
||||
|
||||
public static string CommandLineArgs
|
||||
{
|
||||
get { return string.Join(" ", Environment.GetCommandLineArgs()); }
|
||||
}
|
||||
public static string CommandLineArgs => string.Join(" ", Environment.GetCommandLineArgs());
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user