<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.0-preview.1.25080.5" />

ContextInformation

public sealed class ContextInformation
Encapsulates the context information that is associated with a ConfigurationElement object. This class cannot be inherited.
namespace System.Configuration { public sealed class ContextInformation { private readonly BaseConfigurationRecord _configRecord; private object _hostingContext; private bool _hostingContextEvaluated; public object HostingContext { get { if (!_hostingContextEvaluated) { _hostingContext = _configRecord.ConfigContext; _hostingContextEvaluated = true; } return _hostingContext; } } public bool IsMachineLevel => _configRecord.IsMachineConfig; internal ContextInformation(BaseConfigurationRecord configRecord) { _hostingContextEvaluated = false; _hostingContext = null; _configRecord = configRecord; } public object GetSection(string sectionName) { return _configRecord.GetSection(sectionName); } } }