Ejemplo n.º 1
0
        private void SetContainerLinks(ContainerFragment containerFragment)
        {
            containerFragment.Links.Add("ContainerBody", this);
            containerFragment.Links.Add("GenObject", null);
            var bodies = containerFragment.ProfileDefinition.ProfileRoot().FragmentBodyList;

            containerFragment.Links.Add("PrimaryBody", bodies.Find(containerFragment.Primary));
            containerFragment.Links.Add("SecondaryBody", bodies.Find(containerFragment.Secondary));
            if (containerFragment.Primary != "Empty1")
            {
                containerFragment.Body().Links.Add("Parent", containerFragment);
            }
        }
Ejemplo n.º 2
0
        public ContainerFragment AddContainerFragment(string name, string primary = "", string secondary = "")
        {
            var item = new ContainerFragment(GenDataBase)
            {
                GenObject = ((GenObject)GenObject).CreateGenObject("ContainerFragment"),
                Name      = name,
                Primary   = primary,
                Secondary = secondary
            };

            FragmentList.Add(item);
            return(item);
        }