本文整理汇总了C#中IValueStream.EnterChoice方法的典型用法代码示例。如果您正苦于以下问题:C# IValueStream.EnterChoice方法的具体用法?C# IValueStream.EnterChoice怎么用?C# IValueStream.EnterChoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueStream
的用法示例。
在下文中一共展示了IValueStream.EnterChoice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例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;
}
示例6: 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;
}
示例7: Load
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;
}
示例8: 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;
}
示例9: Load
public static PriorityValue Load(IValueStream stream)
{
PriorityValue ret = null;
Tags tag = (Tags)stream.EnterChoice();
switch(tag)
{
case Tags.Null:
ret = Value<NullWrapper>.Load(stream);
break;
case Tags.Real:
ret = Value<RealWrapper>.Load(stream);
break;
case Tags.Binary:
ret = Value<BinaryWrapper>.Load(stream);
break;
case Tags.Integer:
ret = Value<IntegerWrapper>.Load(stream);
break;
case Tags.ConstructedValue:
ret = Value<ConstructedValueWrapper>.Load(stream);
break;
default:
throw new Exception();
}
stream.LeaveChoice();
return ret;
}
示例10: 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;
}
示例11: Load
public static ExtendedParameter Load(IValueStream stream)
{
ExtendedParameter ret = null;
Tags tag = (Tags)stream.EnterChoice();
switch(tag)
{
case Tags.Null:
ret = Value<NullWrapper>.Load(stream);
break;
case Tags.Real:
ret = Value<RealWrapper>.Load(stream);
break;
case Tags.Integer:
ret = Value<IntegerWrapper>.Load(stream);
break;
case Tags.Boolean:
ret = Value<BooleanWrapper>.Load(stream);
break;
case Tags.Double:
ret = Value<DoubleWrapper>.Load(stream);
break;
case Tags.Octet:
ret = Value<OctetWrapper>.Load(stream);
break;
case Tags.Bitstring:
ret = Value<BitstringWrapper>.Load(stream);
break;
case Tags.Enum:
ret = Value<EnumWrapper>.Load(stream);
break;
case Tags.Reference:
ret = Value<ReferenceWrapper>.Load(stream);
break;
default:
throw new Exception();
}
stream.LeaveChoice();
return ret;
}
示例12: Load
public static ConfirmedServiceAck Load(IValueStream stream)
{
ConfirmedServiceAck ret = null;
Tags tag = (Tags)stream.EnterChoice();
switch(tag)
{
case Tags.GetAlarmSummary:
ret = Value<GetAlarmSummaryWrapper>.Load(stream);
break;
case Tags.GetEnrollmentSummary:
ret = Value<GetEnrollmentSummaryWrapper>.Load(stream);
break;
case Tags.GetEventInformation:
ret = Value<GetEventInformationWrapper>.Load(stream);
break;
case Tags.AtomicReadFile:
ret = Value<AtomicReadFileWrapper>.Load(stream);
break;
case Tags.AtomicWriteFile:
ret = Value<AtomicWriteFileWrapper>.Load(stream);
break;
case Tags.CreateObject:
ret = Value<CreateObjectWrapper>.Load(stream);
break;
case Tags.ReadProperty:
ret = Value<ReadPropertyWrapper>.Load(stream);
break;
case Tags.ReadPropertyConditional:
ret = Value<ReadPropertyConditionalWrapper>.Load(stream);
break;
case Tags.ReadPropertyMultiple:
ret = Value<ReadPropertyMultipleWrapper>.Load(stream);
break;
case Tags.ReadRange:
ret = Value<ReadRangeWrapper>.Load(stream);
break;
case Tags.ConfirmedPrivateTransfer:
ret = Value<ConfirmedPrivateTransferWrapper>.Load(stream);
break;
case Tags.VtOpen:
ret = Value<VtOpenWrapper>.Load(stream);
break;
case Tags.VtData:
ret = Value<VtDataWrapper>.Load(stream);
break;
case Tags.Authenticate:
ret = Value<AuthenticateWrapper>.Load(stream);
break;
default:
throw new Exception();
}
stream.LeaveChoice();
return ret;
}
示例13: 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;
}
示例14: 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;
}
示例15: 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);
}