コード例 #1
0
 public static coreModel.Aggregation ToModuleModel(this searchModel.FacetGroup facetGroup, params string[] appliedFilters)
 {
     var result = new coreModel.Aggregation
     {
         AggregationType = facetGroup.FacetType,
         Field = facetGroup.FieldName,
         Items = facetGroup.Facets.Select(f => f.ToModuleModel(appliedFilters)).ToArray()
     };
     return result;
 }
コード例 #2
0
        public static coreModel.Aggregation ToModuleModel(this searchModel.FacetGroup facetGroup, params string[] appliedFilters)
        {
            var result = new coreModel.Aggregation
            {
                AggregationType = facetGroup.FacetType,
                Field           = facetGroup.FieldName,
                Items           = facetGroup.Facets.Select(f => f.ToModuleModel(appliedFilters)).ToArray()
            };

            return(result);
        }
コード例 #3
0
        public static webModel.Aggregation ToWebModel(this coreModel.Aggregation aggregation)
        {
            var result = new webModel.Aggregation();

            result.InjectFrom(aggregation);

            if (aggregation.Items != null)
            {
                result.Items = aggregation.Items.Select(i => i.ToWebModel()).ToArray();
            }

            return(result);
        }
コード例 #4
0
        public static webModel.Aggregation ToWebModel(this coreModel.Aggregation aggregation)
        {
            var result = new webModel.Aggregation();

            result.AggregationType = aggregation.AggregationType;
            result.Field           = aggregation.Field;

            if (aggregation.Items != null)
            {
                result.Items = aggregation.Items.Select(i => i.ToWebModel()).ToArray();
            }

            if (aggregation.Labels != null)
            {
                result.Labels = aggregation.Labels.Select(ToWebModel).ToArray();
            }

            return(result);
        }