private void processOverrideElement(WriteOverride function, XmlElement overrideElement, string profileName)
        {
            string fullName = overrideElement.GetAttribute(TYPE_ATTRIBUTE);

            overrideElement.IfHasNode(INSTANCE_NODE)
                .Do(element => createOverrideInstance(fullName, element, function, profileName))
                .Else(() =>
                {
                    string defaultKey = overrideElement.GetAttribute(DEFAULT_KEY_ATTRIBUTE);
                    function(fullName, defaultKey);
                });
        }
Example #2
0
        private void processOverrideElement(WriteOverride function, XmlElement overrideElement, string profileName)
        {
            string fullName = overrideElement.GetAttribute(TYPE_ATTRIBUTE);

            overrideElement.IfHasNode(INSTANCE_NODE)
            .Do(element => createOverrideInstance(fullName, element, function, profileName))
            .Else(() =>
            {
                string defaultKey = overrideElement.GetAttribute(DEFAULT_KEY_ATTRIBUTE);
                function(fullName, defaultKey);
            });
        }
        private void createOverrideInstance(string fullName, XmlElement instanceElement, WriteOverride function,
                                            string profileName)
        {
            string key = Profile.InstanceKeyForProfile(profileName);
            InstanceMemento memento = _creator.CreateMemento(instanceElement);
            memento.InstanceKey = key;

            var familyPath = new TypePath(fullName);

            _graphBuilder.ConfigureFamily(familyPath, family =>
            {
                family.AddInstance(memento);
                function(fullName, key);
            });
        }
 private void writeOverrides(XmlElement parentElement, WriteOverride function, string profileName)
 {
     parentElement.ForEachChild(OVERRIDE).Do(element => processOverrideElement(function, element, profileName));
 }
Example #5
0
        private void createOverrideInstance(string fullName, XmlElement instanceElement, WriteOverride function,
                                            string profileName)
        {
            string          key     = Profile.InstanceKeyForProfile(profileName);
            InstanceMemento memento = _creator.CreateMemento(instanceElement);

            memento.InstanceKey = key;

            var familyPath = new TypePath(fullName);

            _graphBuilder.ConfigureFamily(familyPath, family =>
            {
                family.AddInstance(memento);
                function(fullName, key);
            });
        }
Example #6
0
 private void writeOverrides(XmlElement parentElement, WriteOverride function, string profileName)
 {
     parentElement.ForEachChild(OVERRIDE).Do(element => processOverrideElement(function, element, profileName));
 }