Skip to content

Instantly share code, notes, and snippets.

@mauricedb
Created December 13, 2015 14:03
Show Gist options
  • Save mauricedb/886cc2e934aa02f36769 to your computer and use it in GitHub Desktop.
Save mauricedb/886cc2e934aa02f36769 to your computer and use it in GitHub Desktop.
public class HomeController : Controller
{
private readonly IRuntimeEnvironment _runtimeEnvironment;
public HomeController(IRuntimeEnvironment runtimeEnvironment)
{
_runtimeEnvironment = runtimeEnvironment;
}
public IActionResult About()
{
ViewData["Message"] = "Your application is running on:";
ViewData["OperatingSystem"] = _runtimeEnvironment.OperatingSystem;
ViewData["OperatingSystemVersion"] = _runtimeEnvironment.OperatingSystemVersion;
ViewData["RuntimeType"] = _runtimeEnvironment.RuntimeType;
ViewData["RuntimeArchitecture"] = _runtimeEnvironment.RuntimeArchitecture;
ViewData["RuntimeVersion"] = _runtimeEnvironment.RuntimeVersion;
return View();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment