コード例 #1
0
ファイル: GACHelper.cs プロジェクト: semirs1991/CellAO
        // If you use this, fusion will do the streaming & commit
        public static void InstallAssembly(string assemblyPath, InstallReference reference, AssemblyCommitFlags flags)
        {
            if (reference != null)
            {
                if (!InstallReferenceGuid.IsValidGuidScheme(reference.GuidScheme))
                {
                    throw new ArgumentException("Invalid argument( reference guid).");
                }
            }

            IAssemblyCache asmCache = null;

            COM.CheckHR(CreateAssemblyCache(out asmCache, 0));
            COM.CheckHR(asmCache.InstallAssembly((int)flags, assemblyPath, reference));
        }
コード例 #2
0
ファイル: GACHelper.cs プロジェクト: semirs1991/CellAO
        public static void UninstallAssembly(string assemblyName, InstallReference reference,
                                             out AssemblyCacheUninstallDisposition disp)
        {
            AssemblyCacheUninstallDisposition dispResult = AssemblyCacheUninstallDisposition.Uninstalled;

            if (reference != null)
            {
                if (!InstallReferenceGuid.IsValidGuidScheme(reference.GuidScheme))
                {
                    throw new ArgumentException("Invalid argument (reference guid).");
                }
            }

            IAssemblyCache asmCache = null;

            COM.CheckHR(CreateAssemblyCache(out asmCache, 0));
            COM.CheckHR(asmCache.UninstallAssembly(0, assemblyName, reference, out dispResult));

            disp = dispResult;
        }