16 lines
662 B
C#
16 lines
662 B
C#
using PRecAnnot.Abstractions;
|
|
using PRecAnnot.Core;
|
|
|
|
namespace PRecAnnot.Plant3D2026;
|
|
|
|
internal static class ElevationRuntimeConfiguration
|
|
{
|
|
public static ElevationAssets Read()
|
|
{
|
|
var path = Environment.GetEnvironmentVariable("P_REC_ANNOT_LINE_NUMBER_DRAWING_SETTINGS_PATH");
|
|
if (string.IsNullOrWhiteSpace(path) || !Path.IsPathFullyQualified(path) || path.StartsWith("\\\\", StringComparison.Ordinal) || !File.Exists(path))
|
|
throw new InvalidOperationException("ELEVATION_CONFIGURATION_REQUIRED:P_REC_ANNOT_LINE_NUMBER_DRAWING_SETTINGS_PATH");
|
|
return new ElevationSettingsLoader().Load(File.ReadAllText(path));
|
|
}
|
|
}
|