public static CalendarEntry Load(IValueStream stream)
{
CalendarEntry ret = null;
Tags tag = (Tags)stream.EnterChoice();
switch(tag)
{
case Tags.Date:
ret = Value<DateWrapper>.Load(stream);
break;
case Tags.DateRange:
ret = Value<DateRangeWrapper>.Load(stream);
break;
case Tags.WeekNDay:
ret = Value<WeekNDayWrapper>.Load(stream);
break;
default:
throw new Exception();
}
stream.LeaveChoice();
return ret;
}