Last active
August 23, 2016 11:35
-
-
Save jakejscott/dc695433a9feb4ad1068fc440fe0a727 to your computer and use it in GitHub Desktop.
Collections.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static CollectionRule AndContains(CollectionRuleColumn column, string value) | |
{ | |
return new CollectionRule | |
{ | |
Column = column, | |
MatchConditions = CollectionRuleMatchConditions.AllConditions, | |
Operator = CollectionRuleOperator.Contains, | |
Value = value | |
}; | |
} | |
{ | |
var title = "Nicotine Replacement"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Nicotine replacement therapy (NRT) is a medically-approved way to take nicotine by means other than tobacco. It is used to help with quitting smoking or stopping chewing tobacco. It increases the chance of quitting smoking by about 50% to 70%.", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Habitrol Gum Mint"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Habitrol Gum is a mint flavoured, sugar free gum that is a proven and effective method for helping you quit smoking and is an excellent Nicotine Replacement Therapy (NRT).", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Habitrol"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Gum"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Mint"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Habitrol Gum Fruit"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Habitrol Gum is a fruit flavoured, sugar free gum that is a proven and effective method for helping you quit smoking and is an excellent Nicotine Replacement Therapy (NRT).", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Habitrol"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Gum"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Fruit"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Habitrol Lozenge Mint"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Habitrol Lozenge provides an effective aid to combat the unpleasant withdrawal symptoms caused by giving up smoking.", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Habitrol"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Lozenge"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Mint"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Nicorette Gum Icy Mint"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Nicorette Icy Mint Gum offers effective and convenient assistance with quitting smoking.", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Nicorette"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Gum"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Icy Mint"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Nicorette Gum Classic"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Nicorette Classic Gum offers effective and convenient assistance with quitting smoking.", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Nicorette"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Gum"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Classic"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Nicotrol Gum Classic"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Description = "Nicotrol Classic Gum offers effective and convenient assistance with quitting smoking.", | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductTitle, "Nicotrol"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Gum"), | |
AndContains(CollectionRuleColumn.ProductTitle, "Classic"), | |
AndContains(CollectionRuleColumn.ProductType, "Nicotine Replacement Therapy") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "NRT Bulk Packs"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
new CollectionRule | |
{ | |
Column = CollectionRuleColumn.ProductTitle, | |
MatchConditions = CollectionRuleMatchConditions.AllConditions, | |
Operator = CollectionRuleOperator.Contains, | |
Value = "Bulk" | |
}, | |
new CollectionRule | |
{ | |
Column = CollectionRuleColumn.ProductType, | |
MatchConditions = CollectionRuleMatchConditions.AllConditions, | |
Operator = CollectionRuleOperator.Contains, | |
Value = "Nicotine Replacement Therapy" | |
} | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Pain Relief"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductType, "Pain Relief") | |
} | |
}; | |
collections.Add(nicotine); | |
} | |
{ | |
var title = "Hay Fever"; | |
var nicotine = new Collection | |
{ | |
Title = title, | |
Slug = Slug.Create(title), | |
Type = CollectionType.Automatic, | |
SortBy = CollectionSortBy.AlphabeticallyAZ, | |
Rules = new List<CollectionRule> | |
{ | |
AndContains(CollectionRuleColumn.ProductType, "Allergy and Hay Fever") | |
} | |
}; | |
collections.Add(nicotine); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment