protected PickerTargetingGroupModel SerializePickerGroup(Picker.TargetingGroupModel model) { var baskets = this.SerializeBaskets(model.GetBaskets()); var result = new PickerTargetingGroupModel(model.TargetingGroupId, model.TargetingGroupName, baskets); return(result); }
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); }); }); }