| File: EnvironmentWrapper.cs | Web Access |
| Project: Microsoft.Extensions.DependencyModel.csproj (Microsoft.Extensions.DependencyModel) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; namespace Microsoft.Extensions.DependencyModel { internal sealed class EnvironmentWrapper : IEnvironment { public static readonly IEnvironment Default = new EnvironmentWrapper(); public string? GetEnvironmentVariable(string name) => Environment.GetEnvironmentVariable(name); public object? GetAppContextData(string name) => AppDomain.CurrentDomain.GetData(name); public bool IsWindows() => OperatingSystem.IsWindows(); } }