private void AddFromProperties(IEnumerable<PropertyInfo> properties, String accessType, ISet<String> persistentProperties)
        {
            //ORIG: foreach (XProperty property in properties) {
            foreach (PropertyInfo property in properties) {
                // If this is not a persistent property, with the same access type as currently checked,
                // it's not audited as well.
                if (persistentProperties.Contains(property.Name)) {
                    IValue propertyValue = _persistentPropertiesSource.GetProperty(property.Name).Value;

                    PropertyAuditingData propertyData;
                    bool isAudited;
                    if (propertyValue is Component) {
                        ComponentAuditingData componentData = new ComponentAuditingData();
                        isAudited = FillPropertyData(property, componentData, accessType);

                        IPersistentPropertiesSource componentPropertiesSource = new ComponentPropertiesSource(
                                (Component) propertyValue);
                        new AuditedPropertiesReader(ModificationStore.FULL, componentPropertiesSource, componentData,
                                _globalCfg,
                                _propertyNamePrefix + MappingTools.createComponentPrefix(property.Name))
                                .read();

                        propertyData = componentData;
                    } else {
                        propertyData = new PropertyAuditingData();
                        isAudited = FillPropertyData(property, propertyData, accessType);
                    }

                    if (isAudited) {
                        // Now we know that the property is audited
                        _auditedPropertiesHolder.addPropertyAuditingData(property.Name, propertyData);
                    }
                }
            }
        }
        private void AddFromProperties(IEnumerable <PropertyInfo> properties, String accessType, ISet <String> persistentProperties)
        {
            //ORIG: foreach (XProperty property in properties) {
            foreach (PropertyInfo property in properties)
            {
                // If this is not a persistent property, with the same access type as currently checked,
                // it's not audited as well.
                if (persistentProperties.Contains(property.Name))
                {
                    IValue propertyValue = _persistentPropertiesSource.GetProperty(property.Name).Value;

                    PropertyAuditingData propertyData;
                    bool isAudited;
                    if (propertyValue is Component)
                    {
                        ComponentAuditingData componentData = new ComponentAuditingData();
                        isAudited = FillPropertyData(property, componentData, accessType);

                        IPersistentPropertiesSource componentPropertiesSource = new ComponentPropertiesSource(
                            (Component)propertyValue);
                        new AuditedPropertiesReader(ModificationStore.FULL, componentPropertiesSource, componentData,
                                                    _globalCfg,
                                                    _propertyNamePrefix + MappingTools.createComponentPrefix(property.Name))
                        .read();

                        propertyData = componentData;
                    }
                    else
                    {
                        propertyData = new PropertyAuditingData();
                        isAudited    = FillPropertyData(property, propertyData, accessType);
                    }

                    if (isAudited)
                    {
                        // Now we know that the property is audited
                        _auditedPropertiesHolder.addPropertyAuditingData(property.Name, propertyData);
                    }
                }
            }
        }
        private void addFromComponentProperty(DeclaredPersistentProperty property, Component componentValue, AuditedAttribute allClassAudited)
        {
            var componentData = new ComponentAuditingData();
            var isAudited     = fillPropertyData(property.Member,
                                                 property.Property.Name,
                                                 componentData,
                                                 property.Property.PropertyAccessorName,
                                                 allClassAudited);

            var componentPropertiesSource = new ComponentPropertiesSource(componentValue);
            var audPropReader             = new ComponentAuditedPropertiesReader(_metaDataStore,
                                                                                 componentPropertiesSource, componentData,
                                                                                 _globalCfg,
                                                                                 _propertyNamePrefix +
                                                                                 MappingTools.CreateComponentPrefix(property.Property.Name));

            audPropReader.Read();

            if (isAudited)
            {
                // Now we know that the property is audited
                _auditedPropertiesHolder.AddPropertyAuditingData(property.Property.Name, componentData);
            }
        }