public virtual string GetCategoryResponseGroup() { var result = CategoryResponseGroup.None; if (IncludeFields.ContainsAny("assets", "images", "imgSrc")) { result |= CategoryResponseGroup.WithImages; } if (IncludeFields.ContainsAny("properties")) { result |= CategoryResponseGroup.WithProperties; } if (IncludeFields.ContainsAny("seoInfo")) { result |= CategoryResponseGroup.WithSeo; } if (IncludeFields.ContainsAny("slug")) { result |= CategoryResponseGroup.WithLinks; } if (IncludeFields.ContainsAny("outline", "outlines", "slug", "level")) { result |= CategoryResponseGroup.WithOutlines; } return(result.ToString()); }
public virtual string GetItemResponseGroup() { var result = ItemResponseGroup.None; if (IncludeFields.ContainsAny("assets", "images", "imgSrc")) { result |= ItemResponseGroup.WithImages; } if (IncludeFields.ContainsAny("properties", "brandName")) { result |= ItemResponseGroup.WithProperties; } // "descriptions" could look redundant, but better to check it explicitly - clear approach for possible modification or different "Contains" logic if (IncludeFields.ContainsAny("description", "descriptions")) { result |= ItemResponseGroup.ItemEditorialReviews; } if (IncludeFields.ContainsAny("seoInfo")) { result |= ItemResponseGroup.WithSeo; } if (IncludeFields.ContainsAny("slug")) { result |= ItemResponseGroup.WithLinks; result |= ItemResponseGroup.WithSeo; } if (IncludeFields.ContainsAny("outline", "outlines", "slug", "level", "breadcrumbs")) { result |= ItemResponseGroup.WithOutlines; result |= ItemResponseGroup.WithSeo; } if (IncludeFields.ContainsAny("availabilityData")) { result |= ItemResponseGroup.Inventory; } return(result.ToString()); }
public virtual string GetCategoryResponseGroup() { var result = CategoryResponseGroup.None; if (IncludeFields.ContainsAny("assets", "images", "imgSrc")) { result |= CategoryResponseGroup.WithImages; } if (IncludeFields.ContainsAny("properties")) { result |= CategoryResponseGroup.WithProperties; } if (IncludeFields.ContainsAny("seoInfo")) { result |= CategoryResponseGroup.WithSeo; } if (IncludeFields.ContainsAny("slug")) { result |= CategoryResponseGroup.WithLinks; } if (IncludeFields.ContainsAny("outline", "outlines", "slug", "level", "hasParent", "parent")) { result |= CategoryResponseGroup.WithOutlines; } if (IncludeFields.ContainsAny("breadcrumbs")) { result |= CategoryResponseGroup.WithParents | CategoryResponseGroup.WithOutlines; } if (IncludeFields.ContainsAny("description", "descriptions")) { result |= CategoryResponseGroup.Full; } return(result.ToString()); }