diff options
author | Alex Ghiondea <ghiondea.alexandru@microsoft.com> | 2015-12-15 10:43:03 -0800 |
---|---|---|
committer | Alex Ghiondea <ghiondea.alexandru@microsoft.com> | 2015-12-15 10:43:03 -0800 |
commit | a6769943767d25933528a6668fa561062dd233ac (patch) | |
tree | fe97d4757c912a516cefa5e98e0170b155e9f171 /src | |
parent | b171cfd0c7179c39e8959d42aa3505ccfea1e834 (diff) | |
download | coreclr-a6769943767d25933528a6668fa561062dd233ac.tar.gz coreclr-a6769943767d25933528a6668fa561062dd233ac.tar.bz2 coreclr-a6769943767d25933528a6668fa561062dd233ac.zip |
Add the implementation of the TargetFrameworkName method on AppContext.
This change does not contain the packaging work required to expose this API yet.
[tfs-changeset: 1557809]
Diffstat (limited to 'src')
-rw-r--r-- | src/mscorlib/model.xml | 2 | ||||
-rw-r--r-- | src/mscorlib/src/System/AppContext/AppContext.cs | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/mscorlib/model.xml b/src/mscorlib/model.xml index ce97c4af58..ecaa8f4c02 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -162,6 +162,8 @@ <Type Name="System.AppContext"> <Member Name="get_BaseDirectory" /> <Member MemberType="Property" Name="BaseDirectory" /> + <Member Name="get_TargetFrameworkName" /> + <Member MemberType="Property" Name="TargetFrameworkName" /> <Member Name="DefineSwitchDefault(System.String,System.Boolean)" /> <Member Name="SetSwitch(System.String,System.Boolean)" /> <Member Name="TryGetSwitch(System.String,System.Boolean@)" /> diff --git a/src/mscorlib/src/System/AppContext/AppContext.cs b/src/mscorlib/src/System/AppContext/AppContext.cs index feef21b787..30a405d7c9 100644 --- a/src/mscorlib/src/System/AppContext/AppContext.cs +++ b/src/mscorlib/src/System/AppContext/AppContext.cs @@ -32,8 +32,16 @@ namespace System } } - #region Switch APIs + public static string TargetFrameworkName + { + get + { + // Forward the value that is set on the current domain. + return AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName; + } + } + #region Switch APIs static AppContext() { // populate the AppContext with the default set of values |