Esempio n. 1
0
        public static void Save(IValueSink sink, NewValue value)
        {
            sink.EnterChoice((byte)value.Tag);
            switch (value.Tag)
            {
            case Tags.ChangedBits:
                Value <ChangedBitsWrapper> .Save(sink, (ChangedBitsWrapper)value);

                break;

            case Tags.ChangedValue:
                Value <ChangedValueWrapper> .Save(sink, (ChangedValueWrapper)value);

                break;

            default:
                throw new Exception();
            }
            sink.LeaveChoice();
        }
Esempio n. 2
0
        public static NewValue Load(IValueStream stream)
        {
            NewValue ret = null;
            Tags     tag = (Tags)stream.EnterChoice();

            switch (tag)
            {
            case Tags.ChangedBits:
                ret = Value <ChangedBitsWrapper> .Load(stream);

                break;

            case Tags.ChangedValue:
                ret = Value <ChangedValueWrapper> .Load(stream);

                break;

            default:
                throw new Exception();
            }
            stream.LeaveChoice();
            return(ret);
        }
Esempio n. 3
0
 public static void Save(IValueSink sink, NewValue value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.ChangedBits:
             Value<ChangedBitsWrapper>.Save(sink, (ChangedBitsWrapper)value);
             break;
         case Tags.ChangedValue:
             Value<ChangedValueWrapper>.Save(sink, (ChangedValueWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
Esempio n. 4
0
 public ChangeOfValue(NewValue newValue, StatusFlags statusFlags)
 {
     this.NewValue = newValue;
     this.StatusFlags = statusFlags;
 }
Esempio n. 5
0
 public static NotificationParameters NewChangeOfValue(NewValue newValue, StatusFlags statusFlags)
 {
     return new ChangeOfValue(newValue, statusFlags);
 }
Esempio n. 6
0
 public ChangeOfValue(NewValue newValue, StatusFlags statusFlags)
 {
     this.NewValue    = newValue;
     this.StatusFlags = statusFlags;
 }
Esempio n. 7
0
 public static NotificationParameters NewChangeOfValue(NewValue newValue, StatusFlags statusFlags)
 {
     return(new ChangeOfValue(newValue, statusFlags));
 }