Added what TPA is. (dotnet/core-setup#4848)
authorJaliya Udagedara <jaliya.udagedara@hotmail.com>
Tue, 18 Dec 2018 16:10:54 +0000 (05:10 +1300)
committerVitek Karas <vitek.karas@microsoft.com>
Tue, 18 Dec 2018 16:10:54 +0000 (08:10 -0800)
* Added what TPA is.

* Updated code snippet.

* Fix typo

Commit migrated from https://github.com/dotnet/core-setup/commit/12dec873093a27aa294807fcf85e379aaf93e344

docs/installer/design-docs/host-startup-hook.md

index c95f4c5..7061383 100644 (file)
@@ -68,11 +68,11 @@ centralized, while still allowing user code to do its own thing if it
 so desires.
 
 The producer of `StartupHook.dll` needs to ensure that
-`StartupHook.dll` is compatible with the dependencies specified in the
-main application's deps.json, since those dependencies are put on the
-TPA list during the runtime startup, before `StartupHook.dll` is
-loaded. This means that `StartupHook.dll` needs to built against the
-same or lower version of .NET Core than the app.
+`StartupHook.dll` is compatible with the dependencies specified in the 
+main application's deps.json, since those dependencies are put on the 
+Trusted Platform Assemblies (TPA) list during the runtime startup, 
+before `StartupHook.dll` is loaded. This means that `StartupHook.dll` 
+needs to be built against the same or lower version of .NET Core than the app.
 
 ## Example
 
@@ -102,9 +102,9 @@ namespace SharedHostPolicy
     {
         public static Assembly LoadAssemblyFromSharedLocation(AssemblyLoadContext context, AssemblyName assemblyName)
         {
-            string sharedAssemblyPath = // find assemblyName in shared location...
+            string sharedAssemblyPath = ""; // find assemblyName in shared location...
             if (sharedAssemblyPath != null)
-                return AssemblyLoadContext.Default.LoadFromAssemblyPath(sharedAssemblyPath)
+                return AssemblyLoadContext.Default.LoadFromAssemblyPath(sharedAssemblyPath);
             return null;
         }
     }
@@ -230,4 +230,4 @@ be defined either in the app or within the first hook that uses it:
 
 The type should be made `internal` to prevent exposing it as API
 surface to any managed code that happens to have access to the startup
-hook dll. However, the feature will also work if the type is `public`.
\ No newline at end of file
+hook dll. However, the feature will also work if the type is `public`.