private void ParsePCFile(string pcfile) { // Don't register the package twice string pname = Path.GetFileNameWithoutExtension(pcfile); if (RuntimeAssemblyContext.GetPackageInternal(pname) != null || IsCorePackage(pname)) { return; } LibraryPackageInfo pinfo = PcFileCache.GetPackageInfo(pcfile); if (pinfo.IsValidPackage) { RuntimeAssemblyContext.RegisterPackage(pinfo, false); } }
/// <summary> /// Registers a package. /// </summary> /// <param name="pinfo"> /// Information about the package. /// </param> /// <param name="isInternal"> /// Set to true if this package is provided by an add-in and is not installed in the system. /// </param> /// <param name="assemblyFiles"> /// A <see cref="System.String[]"/> /// </param> /// <returns> /// A <see cref="SystemPackage"/> /// </returns> public SystemPackage RegisterPackage(SystemPackageInfo pinfo, bool isInternal, params string[] assemblyFiles) { EnsureInitialized(); return(assemblyContext.RegisterPackage(pinfo, isInternal, assemblyFiles)); }