Example #1
0
        protected PickerTargetingGroupModel SerializePickerGroup(Picker.TargetingGroupModel model)
        {
            var baskets = this.SerializeBaskets(model.GetBaskets());
            var result  = new PickerTargetingGroupModel(model.TargetingGroupId, model.TargetingGroupName, baskets);

            return(result);
        }
Example #2
0
 public void Serialize(TargetingGroupModel group, IJsonWriter writer)
 {
     writer.Write(group.TargetingGroupId, "id");
     writer.Write(group.TargetingGroupName, "name");
     writer.WriteArray(group.GetBaskets(), "baskets", basket =>
     {
         writer.Write(delegate
         {
             this.Serialize(basket, writer);
         });
     });
 }