Exemplo n.º 1
0
        public EAPackage CreatePackage(string name, string type, int parentId)
        {
            int id      = idFactory.NextID;
            var package = new EAPackage(this)
            {
                Name = name, PackageID = id, ParentID = parentId
            };

            packagesById[id] = package;
            if (!package.IsModel)
            {
                ((EAElement)package.Element).ElementID  = idFactory.NextID;
                elementsById[package.Element.ElementID] = (EAElement)package.Element;
            }
            return(package);
        }
 public EADiagramCollection(EARepository repository, EAPackage package)
     : base(ObjectType.otDiagram, repository.CreateDiagram, () => package.PackageID)
 {
 }
 public EAElementCollection(EARepository repository, EAPackage package)
     : base(ObjectType.otElement, repository.CreateElement, () => package.PackageID)
 {
 }
 public EAPackageCollection(EARepository repository, EAPackage parent)
     : base(ObjectType.otPackage, repository.CreatePackage, () => parent != null ? parent.PackageID : 0)
 {
 }