public static PeriodType Load(IValueStream stream)
{
PeriodType ret = null;
Tags tag = (Tags)stream.EnterChoice();
switch(tag)
{
case Tags.CalendarEntry:
ret = Value<CalendarEntryWrapper>.Load(stream);
break;
case Tags.CalendarReference:
ret = Value<CalendarReferenceWrapper>.Load(stream);
break;
default:
throw new Exception();
}
stream.LeaveChoice();
return ret;
}