Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8: {
                    FileNameHash = input.ReadUInt32();
                    break;
                }

                case 16: {
                    PaddedFileSize = input.ReadInt32();
                    break;
                }

                case 24: {
                    UnpaddedFileSize = input.ReadInt64();
                    break;
                }

                case 32: {
                    FileOffset = input.ReadInt64();
                    break;
                }

                case 42: {
                    if (sHAHash_ == null)
                    {
                        SHAHash = new global::SOULS.BHD5.SHAHash();
                    }
                    input.ReadMessage(SHAHash);
                    break;
                }

                case 50: {
                    if (aESKey_ == null)
                    {
                        AESKey = new global::SOULS.BHD5.AESKey();
                    }
                    input.ReadMessage(AESKey);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(FileHeader other)
 {
     if (other == null)
     {
         return;
     }
     if (other.FileNameHash != 0)
     {
         FileNameHash = other.FileNameHash;
     }
     if (other.PaddedFileSize != 0)
     {
         PaddedFileSize = other.PaddedFileSize;
     }
     if (other.UnpaddedFileSize != 0L)
     {
         UnpaddedFileSize = other.UnpaddedFileSize;
     }
     if (other.FileOffset != 0L)
     {
         FileOffset = other.FileOffset;
     }
     if (other.sHAHash_ != null)
     {
         if (sHAHash_ == null)
         {
             SHAHash = new global::SOULS.BHD5.SHAHash();
         }
         SHAHash.MergeFrom(other.SHAHash);
     }
     if (other.aESKey_ != null)
     {
         if (aESKey_ == null)
         {
             AESKey = new global::SOULS.BHD5.AESKey();
         }
         AESKey.MergeFrom(other.AESKey);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }