Ejemplo n.º 1
0
			public void Read(TProtocol iprot)
			{
				TField field;
				iprot.ReadStructBegin();
				while (true)
				{
					field = iprot.ReadFieldBegin();
					if (field.Type == TType.Stop)
					{
						break;
					}
					switch (field.ID)
					{
						case 0:
							if (field.Type == TType.Struct)
							{
								success = new RestResponse();
								success.Read(iprot);
								__isset.success = true;
							}
							else
							{
								TProtocolUtil.Skip(iprot, field.Type);
							}
							break;
						default:
							TProtocolUtil.Skip(iprot, field.Type);
							break;
					}
					iprot.ReadFieldEnd();
				}
				iprot.ReadStructEnd();
			}
Ejemplo n.º 2
0
		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)
						{
							status = (Status) iprot.ReadI32();
							__isset.status = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 2:
						if (field.Type == TType.Map)
						{
							{
								headers = new Dictionary<string, string>();
								TMap _map10 = iprot.ReadMapBegin();
								for (int _i11 = 0; _i11 < _map10.Count; ++_i11)
								{
									string _key12;
									string _val13;
									_key12 = iprot.ReadString();
									_val13 = iprot.ReadString();
									headers[_key12] = _val13;
								}
								iprot.ReadMapEnd();
							}
							__isset.headers = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 3:
						if (field.Type == TType.String)
						{
							body = iprot.ReadBinary();
							__isset.body = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					default:
						TProtocolUtil.Skip(iprot, field.Type);
						break;
				}
				iprot.ReadFieldEnd();
			}
			iprot.ReadStructEnd();
		}
Ejemplo n.º 3
0
		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)
						{
							method = (Method) iprot.ReadI32();
							__isset.method = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 2:
						if (field.Type == TType.String)
						{
							uri = new Uri(iprot.ReadString());
							__isset.uri = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 3:
						if (field.Type == TType.Map)
						{
							{
								parameters = new Dictionary<string, string>();
								TMap _map0 = iprot.ReadMapBegin();
								for (int _i1 = 0; _i1 < _map0.Count; ++_i1)
								{
									string _key2;
									string _val3;
									_key2 = iprot.ReadString();
									_val3 = iprot.ReadString();
									parameters[_key2] = _val3;
								}
								iprot.ReadMapEnd();
							}
							__isset.parameters = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 4:
						if (field.Type == TType.Map)
						{
							{
								headers = new Dictionary<string, string>();
								TMap _map4 = iprot.ReadMapBegin();
								for (int _i5 = 0; _i5 < _map4.Count; ++_i5)
								{
									string _key6;
									string _val7;
									_key6 = iprot.ReadString();
									_val7 = iprot.ReadString();
									headers[_key6] = _val7;
								}
								iprot.ReadMapEnd();
							}
							__isset.headers = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 5:
						if (field.Type == TType.String)
						{
							body = iprot.ReadBinary();
							__isset.body = true;
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					default:
						TProtocolUtil.Skip(iprot, field.Type);
						break;
				}
				iprot.ReadFieldEnd();
			}
			iprot.ReadStructEnd();
		}