Пример #1
0
        /// <summary>
        /// Creates objects
        /// </summary>
        /// <param name="element">XmlElement</param>
        /// <param name="categoryObject">Object</param>
        public override void Create(XElement element, ref ICategoryObject categoryObject)
        {
            factory.Create(element, ref categoryObject);
            if (categoryObject == null)
            {
                return;
            }
            string              name = AbstractXmlCreateObjectFactory.GetName(factory, categoryObject);
            INamedComponent     nc   = categoryObject.Object as INamedComponent;
            PureObjectLabelPeer ol   = new PureObjectLabelPeer(name, nc.Kind, categoryObject.GetType().FullName, 0, 0);

            desktop.AddObjectLabel(ol, categoryObject, true);
        }
        private XmlCreateObjectFactoryAggregate Create(AbstractXmlCreateObjectFactory[] factories)
        {
            AbstractXmlCreateObjectFactory factory = factories[0];
            string            at = factory.AttributeType;
            string            an = factory.AttributeName;
            IXmlObjectFactory fd = factory;
            IDesktop          d  = fd.Desktop;
            XmlCreateObjectFactoryAggregate agg =
                new XmlCreateObjectFactoryAggregate(d, at, an);

            agg.factories = factories;
            return(agg);
        }