Ejemplo n.º 1
0
        void ProcessEntitiesList(XmlNode node, StringBuilder output)
        {
            // iterate on each of the entities and process the <entity> element children
            foreach (var entity in _entityMeta)
            {
                // filter based on the config values
                if (_configuration.FilterEntity(entity.LogicalName))
                {
                    continue;
                }

                LogMessage("Processing entity: " + FirstUpper(entity.LogicalName), EnumLoggingLevel.Information);

                // init the project and propert level slugs
                _entitySlugs       = new Dictionary <string, string>();
                _currentEntityMeta = entity;

                // add the other attribute properties
                foreach (var entProp in _entityProperties)
                {
                    var prop = new KeyValuePair <string, string>(entProp.Name.ToLower(), GetPropertyValue(entity, entProp));

                    // get the current value for each property in the entity
                    _entitySlugs.Add(prop.Key, prop.Value);
                    LogMessage(string.Format("Entity Property: {0}={1}", entProp.Name, prop.Value), EnumLoggingLevel.Verbose);
                }

                // process the node, either CData, <attribute_list>, etc
                ProcessChildNodes(node, output, entity);
            }
        }