本文整理汇总了C#中StreamInfo.Read方法的典型用法代码示例。如果您正苦于以下问题:C# StreamInfo.Read方法的具体用法?C# StreamInfo.Read怎么用?C# StreamInfo.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamInfo
的用法示例。
在下文中一共展示了StreamInfo.Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read (TProtocol iprot)
{
bool isset_inputs = false;
bool isset_streams = false;
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.Map) {
{
Inputs = new Dictionary<GlobalStreamId, Grouping>();
TMap _map12 = iprot.ReadMapBegin();
for( int _i13 = 0; _i13 < _map12.Count; ++_i13)
{
GlobalStreamId _key14;
Grouping _val15;
_key14 = new GlobalStreamId();
_key14.Read(iprot);
_val15 = new Grouping();
_val15.Read(iprot);
Inputs[_key14] = _val15;
}
iprot.ReadMapEnd();
}
isset_inputs = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Map) {
{
Streams = new Dictionary<string, StreamInfo>();
TMap _map16 = iprot.ReadMapBegin();
for( int _i17 = 0; _i17 < _map16.Count; ++_i17)
{
string _key18;
StreamInfo _val19;
_key18 = iprot.ReadString();
_val19 = new StreamInfo();
_val19.Read(iprot);
Streams[_key18] = _val19;
}
iprot.ReadMapEnd();
}
isset_streams = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.I32) {
Parallelism_hint = iprot.ReadI32();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 4:
if (field.Type == TType.String) {
Json_conf = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
if (!isset_inputs)
throw new TProtocolException(TProtocolException.INVALID_DATA);
if (!isset_streams)
throw new TProtocolException(TProtocolException.INVALID_DATA);
}