コード例 #1
0
ファイル: NavSatFix.cs プロジェクト: mrBelka/RustBotCSharp
 public void MergeFrom(NavSatFix other)
 {
     if (other == null)
     {
         return;
     }
     if (other.header_ != null)
     {
         if (header_ == null)
         {
             header_ = new global::Header();
         }
         Header.MergeFrom(other.Header);
     }
     if (other.Latitude != 0D)
     {
         Latitude = other.Latitude;
     }
     if (other.Longitude != 0D)
     {
         Longitude = other.Longitude;
     }
     if (other.Altitude != 0D)
     {
         Altitude = other.Altitude;
     }
     if (other.status_ != null)
     {
         if (status_ == null)
         {
             status_ = new global::NavSatStatus();
         }
         Status.MergeFrom(other.Status);
     }
 }
コード例 #2
0
ファイル: NavSatFix.cs プロジェクト: mrBelka/RustBotCSharp
    public void MergeFrom(pb::CodedInputStream input)
    {
        uint tag;

        while ((tag = input.ReadTag()) != 0)
        {
            switch (tag)
            {
            default:
                input.SkipLastField();
                break;

            case 10: {
                if (header_ == null)
                {
                    header_ = new global::Header();
                }
                input.ReadMessage(header_);
                break;
            }

            case 17: {
                Latitude = input.ReadDouble();
                break;
            }

            case 25: {
                Longitude = input.ReadDouble();
                break;
            }

            case 33: {
                Altitude = input.ReadDouble();
                break;
            }

            case 42: {
                if (status_ == null)
                {
                    status_ = new global::NavSatStatus();
                }
                input.ReadMessage(status_);
                break;
            }
            }
        }
    }