当前位置: 首页>>代码示例>>C#>>正文


C# IValueSink.EnterChoice方法代码示例

本文整理汇总了C#中IValueSink.EnterChoice方法的典型用法代码示例。如果您正苦于以下问题:C# IValueSink.EnterChoice方法的具体用法?C# IValueSink.EnterChoice怎么用?C# IValueSink.EnterChoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IValueSink的用法示例。


在下文中一共展示了IValueSink.EnterChoice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Save

 public static void Save(IValueSink sink, Recipient value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Device:
             Value<DeviceWrapper>.Save(sink, (DeviceWrapper)value);
             break;
         case Tags.Address:
             Value<AddressWrapper>.Save(sink, (AddressWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:Recipient.cs

示例2: Save

 public static void Save(IValueSink sink, TimeStamp value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Time:
             Value<TimeWrapper>.Save(sink, (TimeWrapper)value);
             break;
         case Tags.SequenceNumber:
             Value<SequenceNumberWrapper>.Save(sink, (SequenceNumberWrapper)value);
             break;
         case Tags.DateTime:
             Value<DateTimeWrapper>.Save(sink, (DateTimeWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:19,代码来源:TimeStamp.cs

示例3: Save

 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();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:40,代码来源:UnconfirmedServiceRequest.cs

示例4: Save

 public static void Save(IValueSink sink, Scale value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.FloatScale:
             Value<FloatScaleWrapper>.Save(sink, (FloatScaleWrapper)value);
             break;
         case Tags.IntegerScale:
             Value<IntegerScaleWrapper>.Save(sink, (IntegerScaleWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:Scale.cs

示例5: Save

 public static void Save(IValueSink sink, RangeType value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.ByPosition:
             Value<ByPosition>.Save(sink, (ByPosition)value);
             break;
         case Tags.BySequenceNumber:
             Value<BySequenceNumber>.Save(sink, (BySequenceNumber)value);
             break;
         case Tags.ByTime:
             Value<ByTime>.Save(sink, (ByTime)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:19,代码来源:ReadRangeRequest.cs

示例6: Save

 public static void Save(IValueSink sink, ConfirmedServiceAck value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.GetAlarmSummary:
             Value<GetAlarmSummaryWrapper>.Save(sink, (GetAlarmSummaryWrapper)value);
             break;
         case Tags.GetEnrollmentSummary:
             Value<GetEnrollmentSummaryWrapper>.Save(sink, (GetEnrollmentSummaryWrapper)value);
             break;
         case Tags.GetEventInformation:
             Value<GetEventInformationWrapper>.Save(sink, (GetEventInformationWrapper)value);
             break;
         case Tags.AtomicReadFile:
             Value<AtomicReadFileWrapper>.Save(sink, (AtomicReadFileWrapper)value);
             break;
         case Tags.AtomicWriteFile:
             Value<AtomicWriteFileWrapper>.Save(sink, (AtomicWriteFileWrapper)value);
             break;
         case Tags.CreateObject:
             Value<CreateObjectWrapper>.Save(sink, (CreateObjectWrapper)value);
             break;
         case Tags.ReadProperty:
             Value<ReadPropertyWrapper>.Save(sink, (ReadPropertyWrapper)value);
             break;
         case Tags.ReadPropertyConditional:
             Value<ReadPropertyConditionalWrapper>.Save(sink, (ReadPropertyConditionalWrapper)value);
             break;
         case Tags.ReadPropertyMultiple:
             Value<ReadPropertyMultipleWrapper>.Save(sink, (ReadPropertyMultipleWrapper)value);
             break;
         case Tags.ReadRange:
             Value<ReadRangeWrapper>.Save(sink, (ReadRangeWrapper)value);
             break;
         case Tags.ConfirmedPrivateTransfer:
             Value<ConfirmedPrivateTransferWrapper>.Save(sink, (ConfirmedPrivateTransferWrapper)value);
             break;
         case Tags.VtOpen:
             Value<VtOpenWrapper>.Save(sink, (VtOpenWrapper)value);
             break;
         case Tags.VtData:
             Value<VtDataWrapper>.Save(sink, (VtDataWrapper)value);
             break;
         case Tags.Authenticate:
             Value<AuthenticateWrapper>.Save(sink, (AuthenticateWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:52,代码来源:ConfirmedServiceAck.cs

示例7: Save

 public static void Save(IValueSink sink, NotificationParameters value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.ChangeOfBitstring:
             Value<ChangeOfBitstring>.Save(sink, (ChangeOfBitstring)value);
             break;
         case Tags.ChangeOfState:
             Value<ChangeOfState>.Save(sink, (ChangeOfState)value);
             break;
         case Tags.ChangeOfValue:
             Value<ChangeOfValue>.Save(sink, (ChangeOfValue)value);
             break;
         case Tags.CommandFailure:
             Value<CommandFailure>.Save(sink, (CommandFailure)value);
             break;
         case Tags.FloatingLimit:
             Value<FloatingLimit>.Save(sink, (FloatingLimit)value);
             break;
         case Tags.OutOfRange:
             Value<OutOfRange>.Save(sink, (OutOfRange)value);
             break;
         case Tags.ComplexEventType:
             Value<ComplexEventTypeWrapper>.Save(sink, (ComplexEventTypeWrapper)value);
             break;
         case Tags.ChangeOfLifeSafety:
             Value<ChangeOfLifeSafety>.Save(sink, (ChangeOfLifeSafety)value);
             break;
         case Tags.Extended:
             Value<Extended>.Save(sink, (Extended)value);
             break;
         case Tags.BufferReady:
             Value<BufferReady>.Save(sink, (BufferReady)value);
             break;
         case Tags.UnsignedRange:
             Value<UnsignedRange>.Save(sink, (UnsignedRange)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:43,代码来源:NotificationParameters.cs

示例8: Save

 public static void Save(IValueSink sink, ClientCOV value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.RealIncrement:
             Value<RealIncrementWrapper>.Save(sink, (RealIncrementWrapper)value);
             break;
         case Tags.DefaultIncrement:
             Value<DefaultIncrementWrapper>.Save(sink, (DefaultIncrementWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:ClientCOV.cs

示例9: Save

 public static void Save(IValueSink sink, MessageClassType value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Numeric:
             Value<NumericWrapper>.Save(sink, (NumericWrapper)value);
             break;
         case Tags.Character:
             Value<CharacterWrapper>.Save(sink, (CharacterWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:UnconfirmedTextMessageRequest.cs

示例10: Save

 public static void Save(IValueSink sink, ReadResultType value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.PropertyValue:
             Value<PropertyValueWrapper>.Save(sink, (PropertyValueWrapper)value);
             break;
         case Tags.PropertyAccessError:
             Value<PropertyAccessErrorWrapper>.Save(sink, (PropertyAccessErrorWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:ReadAccessResult.cs

示例11: Save

 public static void Save(IValueSink sink, LogDatumType value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.LogStatus:
             Value<LogStatusWrapper>.Save(sink, (LogStatusWrapper)value);
             break;
         case Tags.BooleanValue:
             Value<BooleanValueWrapper>.Save(sink, (BooleanValueWrapper)value);
             break;
         case Tags.RealValue:
             Value<RealValueWrapper>.Save(sink, (RealValueWrapper)value);
             break;
         case Tags.EnumValue:
             Value<EnumValueWrapper>.Save(sink, (EnumValueWrapper)value);
             break;
         case Tags.UnsignedValue:
             Value<UnsignedValueWrapper>.Save(sink, (UnsignedValueWrapper)value);
             break;
         case Tags.SignedValue:
             Value<SignedValueWrapper>.Save(sink, (SignedValueWrapper)value);
             break;
         case Tags.BitstringValue:
             Value<BitstringValueWrapper>.Save(sink, (BitstringValueWrapper)value);
             break;
         case Tags.NullValue:
             Value<NullValueWrapper>.Save(sink, (NullValueWrapper)value);
             break;
         case Tags.Failure:
             Value<FailureWrapper>.Save(sink, (FailureWrapper)value);
             break;
         case Tags.TimeChange:
             Value<TimeChangeWrapper>.Save(sink, (TimeChangeWrapper)value);
             break;
         case Tags.AnyValue:
             Value<AnyValueWrapper>.Save(sink, (AnyValueWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:43,代码来源:LogRecord.cs

示例12: Save

 public static void Save(IValueSink sink, ConfirmedServiceRequest value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.AcknowledgeAlarm:
             Value<AcknowledgeAlarmWrapper>.Save(sink, (AcknowledgeAlarmWrapper)value);
             break;
         case Tags.ConfirmedCOVNotification:
             Value<ConfirmedCOVNotificationWrapper>.Save(sink, (ConfirmedCOVNotificationWrapper)value);
             break;
         case Tags.ConfirmedEventNotification:
             Value<ConfirmedEventNotificationWrapper>.Save(sink, (ConfirmedEventNotificationWrapper)value);
             break;
         case Tags.GetEnrollmentSummary:
             Value<GetEnrollmentSummaryWrapper>.Save(sink, (GetEnrollmentSummaryWrapper)value);
             break;
         case Tags.GetEventInformation:
             Value<GetEventInformationWrapper>.Save(sink, (GetEventInformationWrapper)value);
             break;
         case Tags.SubscribeCOV:
             Value<SubscribeCOVWrapper>.Save(sink, (SubscribeCOVWrapper)value);
             break;
         case Tags.SubscribeCOVProperty:
             Value<SubscribeCOVPropertyWrapper>.Save(sink, (SubscribeCOVPropertyWrapper)value);
             break;
         case Tags.LifeSafetyOperation:
             Value<LifeSafetyOperationWrapper>.Save(sink, (LifeSafetyOperationWrapper)value);
             break;
         case Tags.AtomicReadFile:
             Value<AtomicReadFileWrapper>.Save(sink, (AtomicReadFileWrapper)value);
             break;
         case Tags.AtomicWriteFile:
             Value<AtomicWriteFileWrapper>.Save(sink, (AtomicWriteFileWrapper)value);
             break;
         case Tags.AddListElement:
             Value<AddListElementWrapper>.Save(sink, (AddListElementWrapper)value);
             break;
         case Tags.RemoveListElement:
             Value<RemoveListElementWrapper>.Save(sink, (RemoveListElementWrapper)value);
             break;
         case Tags.CreateObject:
             Value<CreateObjectWrapper>.Save(sink, (CreateObjectWrapper)value);
             break;
         case Tags.DeleteObject:
             Value<DeleteObjectWrapper>.Save(sink, (DeleteObjectWrapper)value);
             break;
         case Tags.ReadProperty:
             Value<ReadPropertyWrapper>.Save(sink, (ReadPropertyWrapper)value);
             break;
         case Tags.ReadPropertyConditional:
             Value<ReadPropertyConditionalWrapper>.Save(sink, (ReadPropertyConditionalWrapper)value);
             break;
         case Tags.ReadPropertyMultiple:
             Value<ReadPropertyMultipleWrapper>.Save(sink, (ReadPropertyMultipleWrapper)value);
             break;
         case Tags.ReadRange:
             Value<ReadRangeWrapper>.Save(sink, (ReadRangeWrapper)value);
             break;
         case Tags.WriteProperty:
             Value<WritePropertyWrapper>.Save(sink, (WritePropertyWrapper)value);
             break;
         case Tags.WritePropertyMultiple:
             Value<WritePropertyMultipleWrapper>.Save(sink, (WritePropertyMultipleWrapper)value);
             break;
         case Tags.DeviceCommunicationControl:
             Value<DeviceCommunicationControlWrapper>.Save(sink, (DeviceCommunicationControlWrapper)value);
             break;
         case Tags.ConfirmedPrivateTransfer:
             Value<ConfirmedPrivateTransferWrapper>.Save(sink, (ConfirmedPrivateTransferWrapper)value);
             break;
         case Tags.ConfirmedTextMessage:
             Value<ConfirmedTextMessageWrapper>.Save(sink, (ConfirmedTextMessageWrapper)value);
             break;
         case Tags.ReinitializeDevice:
             Value<ReinitializeDeviceWrapper>.Save(sink, (ReinitializeDeviceWrapper)value);
             break;
         case Tags.VtOpen:
             Value<VtOpenWrapper>.Save(sink, (VtOpenWrapper)value);
             break;
         case Tags.VtClose:
             Value<VtCloseWrapper>.Save(sink, (VtCloseWrapper)value);
             break;
         case Tags.VtData:
             Value<VtDataWrapper>.Save(sink, (VtDataWrapper)value);
             break;
         case Tags.Authenticate:
             Value<AuthenticateWrapper>.Save(sink, (AuthenticateWrapper)value);
             break;
         case Tags.RequestKey:
             Value<RequestKeyWrapper>.Save(sink, (RequestKeyWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:97,代码来源:ConfirmedServiceRequest.cs

示例13: Save

 public static void Save(IValueSink sink, ExtendedParameter value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Null:
             Value<NullWrapper>.Save(sink, (NullWrapper)value);
             break;
         case Tags.Real:
             Value<RealWrapper>.Save(sink, (RealWrapper)value);
             break;
         case Tags.Integer:
             Value<IntegerWrapper>.Save(sink, (IntegerWrapper)value);
             break;
         case Tags.Boolean:
             Value<BooleanWrapper>.Save(sink, (BooleanWrapper)value);
             break;
         case Tags.Double:
             Value<DoubleWrapper>.Save(sink, (DoubleWrapper)value);
             break;
         case Tags.Octet:
             Value<OctetWrapper>.Save(sink, (OctetWrapper)value);
             break;
         case Tags.Bitstring:
             Value<BitstringWrapper>.Save(sink, (BitstringWrapper)value);
             break;
         case Tags.Enum:
             Value<EnumWrapper>.Save(sink, (EnumWrapper)value);
             break;
         case Tags.Reference:
             Value<ReferenceWrapper>.Save(sink, (ReferenceWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:37,代码来源:ExtendedParameter.cs

示例14: Save

 public static void Save(IValueSink sink, COVCriteria value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.Bitmask:
             Value<BitmaskWrapper>.Save(sink, (BitmaskWrapper)value);
             break;
         case Tags.ReferencedPropertyIncrement:
             Value<ReferencedPropertyIncrementWrapper>.Save(sink, (ReferencedPropertyIncrementWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:16,代码来源:COVCriteria.cs

示例15: Save

 public static void Save(IValueSink sink, PropertyStates value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.BooleanValue:
             Value<BooleanValueWrapper>.Save(sink, (BooleanValueWrapper)value);
             break;
         case Tags.BinaryValue:
             Value<BinaryValueWrapper>.Save(sink, (BinaryValueWrapper)value);
             break;
         case Tags.EventType:
             Value<EventTypeWrapper>.Save(sink, (EventTypeWrapper)value);
             break;
         case Tags.Polarity:
             Value<PolarityWrapper>.Save(sink, (PolarityWrapper)value);
             break;
         case Tags.ProgramChange:
             Value<ProgramChangeWrapper>.Save(sink, (ProgramChangeWrapper)value);
             break;
         case Tags.ProgramState:
             Value<ProgramStateWrapper>.Save(sink, (ProgramStateWrapper)value);
             break;
         case Tags.ReasonForHalt:
             Value<ReasonForHaltWrapper>.Save(sink, (ReasonForHaltWrapper)value);
             break;
         case Tags.Reliability:
             Value<ReliabilityWrapper>.Save(sink, (ReliabilityWrapper)value);
             break;
         case Tags.State:
             Value<StateWrapper>.Save(sink, (StateWrapper)value);
             break;
         case Tags.SystemStatus:
             Value<SystemStatusWrapper>.Save(sink, (SystemStatusWrapper)value);
             break;
         case Tags.Units:
             Value<UnitsWrapper>.Save(sink, (UnitsWrapper)value);
             break;
         case Tags.UnsignedValue:
             Value<UnsignedValueWrapper>.Save(sink, (UnsignedValueWrapper)value);
             break;
         case Tags.LifeSafetyMode:
             Value<LifeSafetyModeWrapper>.Save(sink, (LifeSafetyModeWrapper)value);
             break;
         case Tags.LifeSafetyState:
             Value<LifeSafetyStateWrapper>.Save(sink, (LifeSafetyStateWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:52,代码来源:PropertyStates.cs


注:本文中的IValueSink.EnterChoice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。