Beispiel #1
0
        public static void Save(IValueSink sink, CalendarEntry value)
        {
            sink.EnterChoice((byte)value.Tag);
            switch (value.Tag)
            {
            case Tags.Date:
                Value <DateWrapper> .Save(sink, (DateWrapper)value);

                break;

            case Tags.DateRange:
                Value <DateRangeWrapper> .Save(sink, (DateRangeWrapper)value);

                break;

            case Tags.WeekNDay:
                Value <WeekNDayWrapper> .Save(sink, (WeekNDayWrapper)value);

                break;

            default:
                throw new Exception();
            }
            sink.LeaveChoice();
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public static PeriodType NewCalendarEntry(CalendarEntry calendarEntry)
 {
     return(new CalendarEntryWrapper(calendarEntry));
 }
Beispiel #4
0
 public CalendarEntryWrapper(CalendarEntry item)
 {
     this.Item = item;
 }
Beispiel #5
0
 public CalendarEntryWrapper(CalendarEntry item)
 {
     this.Item = item;
 }
Beispiel #6
0
 public static PeriodType NewCalendarEntry(CalendarEntry calendarEntry)
 {
     return new CalendarEntryWrapper(calendarEntry);
 }
Beispiel #7
0
 public static void Save(IValueSink sink, CalendarEntry value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Date:
             Value<DateWrapper>.Save(sink, (DateWrapper)value);
             break;
         case Tags.DateRange:
             Value<DateRangeWrapper>.Save(sink, (DateRangeWrapper)value);
             break;
         case Tags.WeekNDay:
             Value<WeekNDayWrapper>.Save(sink, (WeekNDayWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }