コード例 #1
0
 /// <exclude/>
 public static bool ContainsAssembly(AssemblyName assemblyName)
 {
     if (assemblyName == null)
     {
         throw new ArgumentNullException("assemblyName");
     }
     return(GacUtil.ContainsAssembly(assemblyName.FullName));
 }
コード例 #2
0
        /// <exclude/>
        public static bool RemoveAssembly(string assemblyFullName)
        {
            uint num2;

            if ((assemblyFullName == null) || (assemblyFullName.Length == 0))
            {
                throw new ArgumentNullException("assemblyFullName");
            }
            SystemOp.IAssemblyCache cache1 = null;
            if (SystemOp.CreateAssemblyCache(out cache1, 0) != 0)
            {
                return(false);
            }
            if (cache1.UninstallAssembly(0, assemblyFullName, IntPtr.Zero, out num2) != 0)
            {
                return(!GacUtil.ContainsAssembly(assemblyFullName));
            }
            return(true);
        }