Interface IMessage (3.27.1) Stay organized with collections Save and categorize content based on your preferences.
public interface IMessageInterface for a Protocol Buffers message, supportingbasic operations required for serialization.
Namespace
Google.ProtobufAssembly
Google.Protobuf.dll
Properties
Descriptor
MessageDescriptor Descriptor { get; }Descriptor for this message. All instances are expected to return the same descriptor,and for generated types this will be an explicitly-implemented member, returning thesame value as the static property declared on the type.
| Property Value | |
|---|---|
| Type | Description |
MessageDescriptor | |
Methods
CalculateSize()
int CalculateSize()Calculates the size of this message in Protocol Buffer wire format, in bytes.
| Returns | |
|---|---|
| Type | Description |
int | The number of bytes required to write this message to a coded output stream. |
MergeFrom(CodedInputStream)
void MergeFrom(CodedInputStream input)Merges the data from the specified coded input stream with the current message.
| Parameter | |
|---|---|
| Name | Description |
input | CodedInputStream |
See the user guide for precise merge semantics.
WriteTo(CodedOutputStream)
void WriteTo(CodedOutputStream output)Writes the data to the given coded output stream.
| Parameter | |
|---|---|
| Name | Description |
output | CodedOutputStreamCoded output stream to write the data to. Must not be null. |
Extension Methods
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.