Пример #1
0
            public void Read(TProtocol iprot)
            {
                iprot.IncrementRecursionDepth();
                try
                {
                    TField field;
                    iprot.ReadStructBegin();
                    while (true)
                    {
                        field = iprot.ReadFieldBegin();
                        if (field.Type == TType.Stop)
                        {
                            break;
                        }
                        switch (field.ID)
                        {
                        case 0:
                            if (field.Type == TType.List)
                            {
                                {
                                    Success = new List <MMIStandard.MGeometryConstraint>();
                                    TList _list145 = iprot.ReadListBegin();
                                    for (int _i146 = 0; _i146 < _list145.Count; ++_i146)
                                    {
                                        MMIStandard.MGeometryConstraint _elem147;
                                        _elem147 = new MMIStandard.MGeometryConstraint();
                                        _elem147.Read(iprot);
                                        Success.Add(_elem147);
                                    }
                                    iprot.ReadListEnd();
                                }
                            }
                            else
                            {
                                TProtocolUtil.Skip(iprot, field.Type);
                            }
                            break;

                        default:
                            TProtocolUtil.Skip(iprot, field.Type);
                            break;
                        }
                        iprot.ReadFieldEnd();
                    }
                    iprot.ReadStructEnd();
                }
                finally
                {
                    iprot.DecrementRecursionDepth();
                }
            }
Пример #2
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_PositionConstraint = false;
                bool   isset_Suitability        = 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.Struct)
                        {
                            PositionConstraint = new MMIStandard.MGeometryConstraint();
                            PositionConstraint.Read(iprot);
                            isset_PositionConstraint = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Double)
                        {
                            Suitability       = iprot.ReadDouble();
                            isset_Suitability = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_PositionConstraint)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field PositionConstraint not set");
                }
                if (!isset_Suitability)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Suitability not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Пример #3
0
 public MWalkPoint(MMIStandard.MGeometryConstraint PositionConstraint, double Suitability) : this()
 {
     this.PositionConstraint = PositionConstraint;
     this.Suitability        = Suitability;
 }