private void BuildFieldMap(IEnumerable <PropertyInfo> props)
        {
            foreach (var p in props)
            {
                if (p.GetCustomAttribute <IgnoreFieldAttribute>(true) != null)
                {
                    continue;
                }
                var mappingContext = FieldMappingInfoBuilder.Build <T>(p, version, externalAnalyzer);

                fieldMap.Add(mappingContext.PropertyName, mappingContext);

                if (!string.IsNullOrWhiteSpace(mappingContext.FieldName) && mappingContext.Analyzer != null)
                {
                    analyzer.AddAnalyzer(mappingContext.FieldName, mappingContext.Analyzer);
                }
            }
        }
        public ReflectionDocumentMapper(Type type)
        {
            var props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);

            foreach (var p in props)
            {
                if (p.GetCustomAttribute <IgnoreFieldAttribute>(true) != null)
                {
                    continue;
                }
                var mappingContext = FieldMappingInfoBuilder.Build <T>(p);
                fieldMap.Add(mappingContext.PropertyInfo.Name, mappingContext);
            }

            var keyProps = from p in props
                           let a = p.GetCustomAttribute <BaseFieldAttribute>(true)
                                   where a != null && a.Key
                                   select p;

            keyFields = keyProps.Select(kp => fieldMap[kp.Name]).ToList();
        }