IsValidGuidScheme() public static method

public static IsValidGuidScheme ( System.Guid guid ) : bool
guid System.Guid
return bool
コード例 #1
0
ファイル: GACHelper.cs プロジェクト: tobeks/cs-script
        // 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 プロジェクト: tobeks/cs-script
        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;
        }