Interface IRecord<T>
- Assembly
- Solace.SchemaRegistry.Serdes.Core.dll
Represents a data record that contains both the actual data value and its associated metadata. This interface provides a complete representation of a message or data item including routing information, headers, and the payload data.
public interface IRecord<out T>
Type Parameters
TThe type of the data value contained in this record
Remarks
IRecord serves as a container that combines data with its contextual metadata during serialization and deserialization operations. This design allows schema resolvers, serializers, and deserializers to access both the data content and the contextual information needed for proper processing.
Records are typically created during the serialization process to package data with its routing and processing metadata, and are consumed during deserialization to provide complete context for data processing decisions.
Properties
Metadata
Gets the metadata associated with this record, including routing information and headers.
IMetadata Metadata { get; }
Property Value
- IMetadata
An IMetadata instance containing the destination name, headers, and other contextual information associated with this record.
Remarks
The metadata provides the contextual information needed for schema resolution, routing decisions, and processing behavior. This includes the destination name (topic or queue) and any headers that contain schema identifiers, content types, or application-specific metadata.
This property should never return null, as metadata is essential for proper record processing and schema resolution operations.
Value
Gets the actual data value contained in this record.
T Value { get; }
Property Value
- T
The data value of type T that represents the payload or content of this record. May be null if the record represents an explicit null value.
Remarks
The value represents the actual data content that will be serialized or has been deserialized. The type T determines the structure and format of the data, and influences schema resolution and serialization behavior.
In some serialization scenarios, the value may be null to represent explicit null values. Schema resolvers and serializers should handle null values appropriately based on the schema and serialization requirements.