/// <summary> /// 移除私有包 /// </summary> /// <returns></returns> public void RemovePrivilegedPackage(PrivilegedPackage package) { lock (privilegedPackages) { if (this.privilegedPackages.Contains(package)) { this.privilegedPackages.Remove(package); } } }
/// <summary> /// 添加私有包 /// </summary> /// <returns></returns> public void AddPrivilegedPackage(PrivilegedPackage package) { lock (privilegedPackages) { if (!this.privilegedPackages.Contains(package)) { this.privilegedPackages.Add(package); } } }
/// <summary> /// 创建导出包 /// </summary> /// <param name="bundle"></param> /// <param name="asemblyEntry"></param> /// <returns></returns> internal static PrivilegedPackage Create(AbstractBundle bundle, AssemblyEntry asemblyEntry) { try { var package = new PrivilegedPackage(bundle, asemblyEntry); package.Initialize(); return(package); } catch (Exception ex) { Log.Debug(ex); } return(null); }