public static void Save(IValueSink sink, UnconfirmedServiceRequest value) { sink.EnterChoice((byte)value.Tag); switch (value.Tag) { case Tags.IAm: Value <IAmWrapper> .Save(sink, (IAmWrapper)value); break; case Tags.IHave: Value <IHaveWrapper> .Save(sink, (IHaveWrapper)value); break; case Tags.UnconfirmedCOVNotification: Value <UnconfirmedCOVNotificationWrapper> .Save(sink, (UnconfirmedCOVNotificationWrapper)value); break; case Tags.UnconfirmedEventNotification: Value <UnconfirmedEventNotificationWrapper> .Save(sink, (UnconfirmedEventNotificationWrapper)value); break; case Tags.UnconfirmedPrivateTransfer: Value <UnconfirmedPrivateTransferWrapper> .Save(sink, (UnconfirmedPrivateTransferWrapper)value); break; case Tags.UnconfirmedTextMessage: Value <UnconfirmedTextMessageWrapper> .Save(sink, (UnconfirmedTextMessageWrapper)value); break; case Tags.TimeSynchronization: Value <TimeSynchronizationWrapper> .Save(sink, (TimeSynchronizationWrapper)value); break; case Tags.WhoHas: Value <WhoHasWrapper> .Save(sink, (WhoHasWrapper)value); break; case Tags.WhoIs: Value <WhoIsWrapper> .Save(sink, (WhoIsWrapper)value); break; case Tags.UtcTimeSynchronization: Value <UtcTimeSynchronizationWrapper> .Save(sink, (UtcTimeSynchronizationWrapper)value); break; default: throw new Exception(); } sink.LeaveChoice(); }
public static void Save(IValueSink sink, UnconfirmedServiceRequest value) { sink.EnterChoice((byte)value.Tag); switch(value.Tag) { case Tags.IAm: Value<IAmWrapper>.Save(sink, (IAmWrapper)value); break; case Tags.IHave: Value<IHaveWrapper>.Save(sink, (IHaveWrapper)value); break; case Tags.UnconfirmedCOVNotification: Value<UnconfirmedCOVNotificationWrapper>.Save(sink, (UnconfirmedCOVNotificationWrapper)value); break; case Tags.UnconfirmedEventNotification: Value<UnconfirmedEventNotificationWrapper>.Save(sink, (UnconfirmedEventNotificationWrapper)value); break; case Tags.UnconfirmedPrivateTransfer: Value<UnconfirmedPrivateTransferWrapper>.Save(sink, (UnconfirmedPrivateTransferWrapper)value); break; case Tags.UnconfirmedTextMessage: Value<UnconfirmedTextMessageWrapper>.Save(sink, (UnconfirmedTextMessageWrapper)value); break; case Tags.TimeSynchronization: Value<TimeSynchronizationWrapper>.Save(sink, (TimeSynchronizationWrapper)value); break; case Tags.WhoHas: Value<WhoHasWrapper>.Save(sink, (WhoHasWrapper)value); break; case Tags.WhoIs: Value<WhoIsWrapper>.Save(sink, (WhoIsWrapper)value); break; case Tags.UtcTimeSynchronization: Value<UtcTimeSynchronizationWrapper>.Save(sink, (UtcTimeSynchronizationWrapper)value); break; default: throw new Exception(); } sink.LeaveChoice(); }
public static UnconfirmedServiceRequest Load(IValueStream stream) { UnconfirmedServiceRequest ret = null; Tags tag = (Tags)stream.EnterChoice(); switch (tag) { case Tags.IAm: ret = Value <IAmWrapper> .Load(stream); break; case Tags.IHave: ret = Value <IHaveWrapper> .Load(stream); break; case Tags.UnconfirmedCOVNotification: ret = Value <UnconfirmedCOVNotificationWrapper> .Load(stream); break; case Tags.UnconfirmedEventNotification: ret = Value <UnconfirmedEventNotificationWrapper> .Load(stream); break; case Tags.UnconfirmedPrivateTransfer: ret = Value <UnconfirmedPrivateTransferWrapper> .Load(stream); break; case Tags.UnconfirmedTextMessage: ret = Value <UnconfirmedTextMessageWrapper> .Load(stream); break; case Tags.TimeSynchronization: ret = Value <TimeSynchronizationWrapper> .Load(stream); break; case Tags.WhoHas: ret = Value <WhoHasWrapper> .Load(stream); break; case Tags.WhoIs: ret = Value <WhoIsWrapper> .Load(stream); break; case Tags.UtcTimeSynchronization: ret = Value <UtcTimeSynchronizationWrapper> .Load(stream); break; default: throw new Exception(); } stream.LeaveChoice(); return(ret); }