using System.Diagnostics.CodeAnalysis; namespace Dalamud.Common.Util; public static class EnvironmentUtils { /// /// Attempts to get an environment variable using the Try pattern. /// /// The env var to get. /// An output containing the env var, if present. /// A boolean indicating whether the var was present. public static bool TryGetEnvironmentVariable(string variableName, [NotNullWhen(true)] out string? value) { value = Environment.GetEnvironmentVariable(variableName); return value != null; } }