public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { ChatIDBytes = input.ReadBytes(); break; } case 18: { global::ChatServer.Transmissions.EncryptedMessage subBuilder = new global::ChatServer.Transmissions.EncryptedMessage(); if (messageTypeCase_ == MessageTypeOneofCase.EncryptedMessage) { subBuilder.MergeFrom(EncryptedMessage); } input.ReadMessage(subBuilder); EncryptedMessage = subBuilder; break; } case 26: { global::ChatServer.Transmissions.ServerMessage subBuilder = new global::ChatServer.Transmissions.ServerMessage(); if (messageTypeCase_ == MessageTypeOneofCase.ServerMessage) { subBuilder.MergeFrom(ServerMessage); } input.ReadMessage(subBuilder); ServerMessage = subBuilder; break; } case 34: { if (createdAt_ == null) { CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreatedAt); break; } } } #endif }
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { ChatIDBytes = input.ReadBytes(); break; } case 18: { global::ChatServer.Transmissions.EncryptedMessage subBuilder = new global::ChatServer.Transmissions.EncryptedMessage(); if (messageTypeCase_ == MessageTypeOneofCase.EncryptedMessage) { subBuilder.MergeFrom(EncryptedMessage); } input.ReadMessage(subBuilder); EncryptedMessage = subBuilder; break; } case 26: { global::ChatServer.Transmissions.ServerMessage subBuilder = new global::ChatServer.Transmissions.ServerMessage(); if (messageTypeCase_ == MessageTypeOneofCase.ServerMessage) { subBuilder.MergeFrom(ServerMessage); } input.ReadMessage(subBuilder); ServerMessage = subBuilder; break; } case 34: { if (createdAt_ == null) { CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreatedAt); break; } } } }
public void MergeFrom(Message other) { if (other == null) { return; } if (other.ChatIDBytes.Length != 0) { ChatIDBytes = other.ChatIDBytes; } if (other.createdAt_ != null) { if (createdAt_ == null) { CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreatedAt.MergeFrom(other.CreatedAt); } switch (other.MessageTypeCase) { case MessageTypeOneofCase.EncryptedMessage: if (EncryptedMessage == null) { EncryptedMessage = new global::ChatServer.Transmissions.EncryptedMessage(); } EncryptedMessage.MergeFrom(other.EncryptedMessage); break; case MessageTypeOneofCase.ServerMessage: if (ServerMessage == null) { ServerMessage = new global::ChatServer.Transmissions.ServerMessage(); } ServerMessage.MergeFrom(other.ServerMessage); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }