aspnetcore/src/Microsoft.AspNet.Mvc.Common/PlatformHelper.cs

20 lines
537 B
C#

// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNet.Mvc
{
internal static class PlatformHelper
{
private static readonly Lazy<bool> _isMono = new Lazy<bool>(() => Type.GetType("Mono.Runtime") != null);
public static bool IsMono
{
get
{
return _isMono.Value;
}
}
}
}