Exemplo n.º 1
0
        public void Enrich(ContentData <T> data)
        {
            Guard.NotNull(data, nameof(data));

            foreach (var field in schema.Fields)
            {
                var fieldKey       = data.GetKey(field);
                var fieldData      = data.GetOrCreate(fieldKey, k => new ContentFieldData());
                var fieldPartition = partitionResolver(field.Paritioning);

                foreach (var partitionItem in fieldPartition)
                {
                    Enrich(field, fieldData, partitionItem);
                }

                if (fieldData.Count > 0)
                {
                    data[fieldKey] = fieldData;
                }
            }
        }