private Tuple <IPropertyMapper, string> mapperAndDelegatePropertyName(string referencingPropertyName)
        {
            // Name of the property, to which we will delegate the mapping.
            string delegatePropertyName;

            // Checking if the property name doesn't reference a collection in a component - then the name will containa a .
            var dotIndex = referencingPropertyName.IndexOf('.');

            if (dotIndex != -1)
            {
                // Computing the name of the component
                var componentName = referencingPropertyName.Substring(0, dotIndex);
                // And the name of the property in the component
                var propertyInComponentName = MappingTools.CreateComponentPrefix(componentName)
                                              + referencingPropertyName.Substring(dotIndex + 1);

                // We need to get the mapper for the component.
                referencingPropertyName = componentName;
                // As this is a component, we delegate to the property in the component.
                delegatePropertyName = propertyInComponentName;
            }
            else
            {
                // If this is not a component, we delegate to the same property.
                delegatePropertyName = referencingPropertyName;
            }
            var propertyMapper = propertyMapperKey(referencingPropertyName);

            return(propertyMapper == null ? null : new Tuple <IPropertyMapper, string>(propertyMapper, delegatePropertyName));
        }
        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);
            }
        }