示例#1
0
        public virtual void RegisterPackage(Net.Vpc.Upa.Package item, Net.Vpc.Upa.Package parent)
        {
            string s = null;

            if (parent == null)
            {
                s = "/" + item.GetName();
            }
            else
            {
                s = parent.GetPath() + "/" + item.GetName();
            }
            packages[s] = item;
        }
示例#2
0
        public virtual bool ContainsPackage(Net.Vpc.Upa.Package item, Net.Vpc.Upa.Package parent)
        {
            string s = null;

            if (parent == null)
            {
                s = "/" + item.GetName();
            }
            else
            {
                s = parent.GetPath() + "/" + item.GetName();
            }
            return(packages.ContainsKey(s));
        }
示例#3
0
 public virtual Net.Vpc.Upa.Package GetPart(string name)
 {
     foreach (Net.Vpc.Upa.PersistenceUnitPart persistenceUnitItem in parts)
     {
         if (persistenceUnitItem is Net.Vpc.Upa.Package)
         {
             Net.Vpc.Upa.Package m = (Net.Vpc.Upa.Package)persistenceUnitItem;
             if (m.GetName().Equals(name))
             {
                 return(m);
             }
         }
     }
     throw new Net.Vpc.Upa.Exceptions.NoSuchPackageException(name, null);
 }