public void ParseInstanceElement(XmlElement element)
        {
            var pluginTypePath = new TypePath(element.GetAttribute(PLUGIN_TYPE));

            _builder.ConfigureFamily(pluginTypePath, family =>
            {
                InstanceMemento memento =
                    new XmlInstance(element);
                //family.AddInstance(memento);
                throw new NotImplementedException();
            });
        }
        public void ParseDefaultElement(XmlElement element)
        {
            var pluginTypePath = new TypePath(element.GetAttribute(PLUGIN_TYPE));

            _builder.ConfigureFamily(pluginTypePath, family =>
            {
                InstanceScope scope = findScope(element);
                family.Lifecycle = Lifecycles.GetLifecycle(scope);
                throw new NotImplementedException();
                InstanceMemento memento = new XmlInstance(element);
                //family.AddDefaultMemento(memento);
            });
        }
        private void createOverrideInstance(string fullName, XmlElement instanceElement, WriteOverride function,
            string profileName)
        {
            string key = Profile.InstanceKeyForProfile(profileName);
            InstanceMemento memento = new XmlInstance(instanceElement);
            memento.InstanceKey = key;

            var familyPath = new TypePath(fullName);

            _graphBuilder.ConfigureFamily(familyPath, family =>
            {
                throw new NotImplementedException();
                //family.AddInstance(memento);
                function(fullName, key);
            });
        }
Beispiel #4
0
        public override InstanceMemento[] GetChildrenArray(string Key)
        {
            XmlNode childrenNode = _element[Key];
            if (childrenNode == null)
            {
                return null;
            }

            var list = new ArrayList();
            var element = (XmlElement) childrenNode.FirstChild;
            while (element != null)
            {
                if (element.NodeType == XmlNodeType.Element)
                {
                    InstanceMemento childMemento = new XmlInstance(element);
                    list.Add(childMemento);
                }

                element = (XmlElement) element.NextSibling;
            }

            return (InstanceMemento[]) list.ToArray(typeof (InstanceMemento));
        }