コード例 #1
0
 /// <summary>
 /// 移除私有包
 /// </summary>
 /// <returns></returns>
 public void RemovePrivilegedPackage(PrivilegedPackage package)
 {
     lock (privilegedPackages)
     {
         if (this.privilegedPackages.Contains(package))
         {
             this.privilegedPackages.Remove(package);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// 添加私有包
 /// </summary>
 /// <returns></returns>
 public void AddPrivilegedPackage(PrivilegedPackage package)
 {
     lock (privilegedPackages)
     {
         if (!this.privilegedPackages.Contains(package))
         {
             this.privilegedPackages.Add(package);
         }
     }
 }
コード例 #3
0
 /// <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);
 }