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


C# IValueStream.LeaveChoice方法代码示例

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


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

示例1: Load

 public static COVCriteria Load(IValueStream stream)
 {
     COVCriteria ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.Bitmask:
             ret = Value<BitmaskWrapper>.Load(stream);
             break;
         case Tags.ReferencedPropertyIncrement:
             ret = Value<ReferencedPropertyIncrementWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:COVCriteria.cs

示例2: Load

 public static AtomicWriteFileAck Load(IValueStream stream)
 {
     AtomicWriteFileAck ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.FileStartPosition:
             ret = Value<FileStartPositionWrapper>.Load(stream);
             break;
         case Tags.FileStartRecord:
             ret = Value<FileStartRecordWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:AtomicWriteFileAck.cs

示例3: Load

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

示例4: Load

 public static Recipient Load(IValueStream stream)
 {
     Recipient ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.Device:
             ret = Value<DeviceWrapper>.Load(stream);
             break;
         case Tags.Address:
             ret = Value<AddressWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:Recipient.cs

示例5: Load

 public static ClientCOV Load(IValueStream stream)
 {
     ClientCOV ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.RealIncrement:
             ret = Value<RealIncrementWrapper>.Load(stream);
             break;
         case Tags.DefaultIncrement:
             ret = Value<DefaultIncrementWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:ClientCOV.cs

示例6: Load

 public static Scale Load(IValueStream stream)
 {
     Scale ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.FloatScale:
             ret = Value<FloatScaleWrapper>.Load(stream);
             break;
         case Tags.IntegerScale:
             ret = Value<IntegerScaleWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:Scale.cs

示例7: Load

 public static AccessMethodType Load(IValueStream stream)
 {
     AccessMethodType ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.StreamAccess:
             ret = Value<StreamAccess>.Load(stream);
             break;
         case Tags.RecordAccess:
             ret = Value<RecordAccess>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:AtomicReadFileAck.cs

示例8: Load

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

示例9: Load

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

示例10: Load

 public static TimeStamp Load(IValueStream stream)
 {
     TimeStamp ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.Time:
             ret = Value<TimeWrapper>.Load(stream);
             break;
         case Tags.SequenceNumber:
             ret = Value<SequenceNumberWrapper>.Load(stream);
             break;
         case Tags.DateTime:
             ret = Value<DateTimeWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:21,代码来源:TimeStamp.cs

示例11: Load

 public static RangeType Load(IValueStream stream)
 {
     RangeType ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.ByPosition:
             ret = Value<ByPosition>.Load(stream);
             break;
         case Tags.BySequenceNumber:
             ret = Value<BySequenceNumber>.Load(stream);
             break;
         case Tags.ByTime:
             ret = Value<ByTime>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:21,代码来源:ReadRangeRequest.cs

示例12: Load

            public static TestType Load(IValueStream stream)
            {
                stream.EnterSequence();
                var nullValue = stream.GetNull();
                var booleanValue = stream.GetBoolean();
                var optionalValue = Value<Option<byte>>.Loader(stream);

                var choice = stream.EnterChoice();
                ITestChoice choiceValue = null;
                switch (choice)
                {
                    case 0:
                        choiceValue = FloatChoice.Load(stream);
                        break;
                    case 1:
                        choiceValue = DoubleChoice.Load(stream);
                        break;
                    case 2:
                        choiceValue = StringChoice.Load(stream);
                        break;
                }
                stream.LeaveChoice();

                var arrayValue = ReadOnlyArray<ushort>.Load(stream);

                return new TestType(nullValue, booleanValue, optionalValue, choiceValue, arrayValue);
            }
开发者ID:LorenVS,项目名称:bacstack,代码行数:27,代码来源:TagReaderStreamTests.cs

示例13: Load

 public static NotificationParameters Load(IValueStream stream)
 {
     NotificationParameters ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.ChangeOfBitstring:
             ret = Value<ChangeOfBitstring>.Load(stream);
             break;
         case Tags.ChangeOfState:
             ret = Value<ChangeOfState>.Load(stream);
             break;
         case Tags.ChangeOfValue:
             ret = Value<ChangeOfValue>.Load(stream);
             break;
         case Tags.CommandFailure:
             ret = Value<CommandFailure>.Load(stream);
             break;
         case Tags.FloatingLimit:
             ret = Value<FloatingLimit>.Load(stream);
             break;
         case Tags.OutOfRange:
             ret = Value<OutOfRange>.Load(stream);
             break;
         case Tags.ComplexEventType:
             ret = Value<ComplexEventTypeWrapper>.Load(stream);
             break;
         case Tags.ChangeOfLifeSafety:
             ret = Value<ChangeOfLifeSafety>.Load(stream);
             break;
         case Tags.Extended:
             ret = Value<Extended>.Load(stream);
             break;
         case Tags.BufferReady:
             ret = Value<BufferReady>.Load(stream);
             break;
         case Tags.UnsignedRange:
             ret = Value<UnsignedRange>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:45,代码来源:NotificationParameters.cs

示例14: Load

 public static MessageClassType Load(IValueStream stream)
 {
     MessageClassType ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.Numeric:
             ret = Value<NumericWrapper>.Load(stream);
             break;
         case Tags.Character:
             ret = Value<CharacterWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:18,代码来源:UnconfirmedTextMessageRequest.cs

示例15: Load

 public static LogDatumType Load(IValueStream stream)
 {
     LogDatumType ret = null;
     Tags tag = (Tags)stream.EnterChoice();
     switch(tag)
     {
         case Tags.LogStatus:
             ret = Value<LogStatusWrapper>.Load(stream);
             break;
         case Tags.BooleanValue:
             ret = Value<BooleanValueWrapper>.Load(stream);
             break;
         case Tags.RealValue:
             ret = Value<RealValueWrapper>.Load(stream);
             break;
         case Tags.EnumValue:
             ret = Value<EnumValueWrapper>.Load(stream);
             break;
         case Tags.UnsignedValue:
             ret = Value<UnsignedValueWrapper>.Load(stream);
             break;
         case Tags.SignedValue:
             ret = Value<SignedValueWrapper>.Load(stream);
             break;
         case Tags.BitstringValue:
             ret = Value<BitstringValueWrapper>.Load(stream);
             break;
         case Tags.NullValue:
             ret = Value<NullValueWrapper>.Load(stream);
             break;
         case Tags.Failure:
             ret = Value<FailureWrapper>.Load(stream);
             break;
         case Tags.TimeChange:
             ret = Value<TimeChangeWrapper>.Load(stream);
             break;
         case Tags.AnyValue:
             ret = Value<AnyValueWrapper>.Load(stream);
             break;
         default:
             throw new Exception();
     }
     stream.LeaveChoice();
     return ret;
 }
开发者ID:LorenVS,项目名称:bacstack,代码行数:45,代码来源:LogRecord.cs


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