コード例 #1
0
ファイル: Ngen.cs プロジェクト: slavagu/NgenWrapper
 /// <summary>
 /// Delete the native images of an assembly and its dependencies from the native image cache.
 /// </summary>
 /// <param name="assembly">Path of the assembly or full display name.</param>
 /// <returns>True if uninstallation succeeded, or False if the assembly is not installed.</returns>
 public static bool UninstallAssembly(string assembly)
 {
     using (var ngenLauncher = new NgenLauncher())
     {
         ngenLauncher.UninstallAssembly(assembly);
         ngenLauncher.WaitForExit();
         return ngenLauncher.IsSuccessful;
     }
 }
コード例 #2
0
ファイル: Ngen.cs プロジェクト: slavagu/NgenWrapper
 /// <summary>
 /// Check if the native image for an assembly has been installed.
 /// </summary>
 /// <param name="assembly">Path of the assembly or full display name.</param>
 /// <remarks>Referenced assemblies are not included in the check.</remarks>
 public static bool IsAssemblyInstalled(string assembly)
 {
     using (var ngenLauncher = new NgenLauncher())
     {
         ngenLauncher.DisplayAssembly(assembly);
         ngenLauncher.WaitForExit();
         return ngenLauncher.IsSuccessful;
     }
 }