public static webModel.AggregationItem ToWebModel(this coreModel.AggregationItem item) { var result = new webModel.AggregationItem(); result.InjectFrom(item); return(result); }
public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters) { var result = new coreModel.AggregationItem { Label = facet.Name, Value = facet.Key, Count = facet.Count, IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase)) }; return result; }
public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters) { var result = new coreModel.AggregationItem { Label = facet.Name, Value = facet.Key, Count = facet.Count, IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase)) }; return(result); }
public static webModel.AggregationItem ToWebModel(this coreModel.AggregationItem item) { var result = new webModel.AggregationItem(); result.InjectFrom(item); if (item.Labels != null) { result.Labels = item.Labels.Select(ToWebModel).ToArray(); } return(result); }
public static webModel.AggregationItem ToWebModel(this coreModel.AggregationItem item) { var result = new webModel.AggregationItem(); result.Count = item.Count; result.IsApplied = item.IsApplied; result.Value = item.Value; if (item.Labels != null) { result.Labels = item.Labels.Select(ToWebModel).ToArray(); } return(result); }
public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters) { var result = new coreModel.AggregationItem { Value = facet.Key, Count = facet.Count, IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase)) }; if (facet.Labels != null) { result.Labels = facet.Labels.Select(ToModuleModel).ToArray(); } return result; }
public static coreModel.AggregationItem ToModuleModel(this searchModel.Facet facet, params string[] appliedFilters) { var result = new coreModel.AggregationItem { Value = facet.Key, Count = facet.Count, IsApplied = appliedFilters.Any(x => x.Equals(facet.Key, StringComparison.OrdinalIgnoreCase)) }; if (facet.Labels != null) { result.Labels = facet.Labels.Select(ToModuleModel).ToArray(); } return(result); }
public static webModel.AggregationItem ToWebModel(this coreModel.AggregationItem item) { var result = new webModel.AggregationItem { Value = item.Value, Count = item.Count, IsApplied = item.IsApplied, RequestedLowerBound = item.RequestedLowerBound, RequestedUpperBound = item.RequestedUpperBound, }; if (item.Labels != null) { result.Labels = item.Labels.Select(ToWebModel).ToArray(); } return(result); }