Add the implementation of the TargetFrameworkName method on AppContext.
authorAlex Ghiondea <ghiondea.alexandru@microsoft.com>
Tue, 15 Dec 2015 18:43:03 +0000 (10:43 -0800)
committerAlex Ghiondea <ghiondea.alexandru@microsoft.com>
Tue, 15 Dec 2015 18:43:03 +0000 (10:43 -0800)
This change does not contain the packaging work required to expose this API yet.

[tfs-changeset: 1557809]

src/mscorlib/model.xml
src/mscorlib/src/System/AppContext/AppContext.cs

index ce97c4af58b8cec6a9e224cdd56b76a878872b4d..ecaa8f4c02570c1c689004d1a8492d0da9359a7f 100644 (file)
     <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@)" />
index feef21b787b720b7e3220ef036dd54bb11b8d76c..30a405d7c9969e2b2ba70cfa4435080f8bce18a4 100644 (file)
@@ -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