本文整理匯總了C#中OpenZWave.RemoteValueID.Read方法的典型用法代碼示例。如果您正苦於以下問題:C# RemoteValueID.Read方法的具體用法?C# RemoteValueID.Read怎麽用?C# RemoteValueID.Read使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenZWave.RemoteValueID
的用法示例。
在下文中一共展示了RemoteValueID.Read方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Read
public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.Byte) {
_sceneId = iprot.ReadByte();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
_valueId = new RemoteValueID();
_valueId.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.I32) {
_value = iprot.ReadI32();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例2: Read
public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.I32) {
Retval = iprot.ReadI32();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
O_value = new List<RemoteValueID>();
TList _list28 = iprot.ReadListBegin();
for( int _i29 = 0; _i29 < _list28.Count; ++_i29)
{
RemoteValueID _elem30 = new RemoteValueID();
_elem30 = new RemoteValueID();
_elem30.Read(iprot);
O_value.Add(_elem30);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}