Skip to content
Meshline
SDK 1.1.0 · TypeView source on GitHub

Developer guide · API index

Members on this page

Meshline.Sdk

Meshline.Models.Protocol

MessageBody Class

Contains a text body and its protocol-supported media type.

public sealed record MessageBody : Meshline.Models.Protocol.ProtocolModel, System.IEquatable<Meshline.Models.Protocol.MessageBody>

Inheritance System.Object → ProtocolModel → MessageBody

Implements System.IEquatable<MessageBody>

Properties

MessageBody.ContentType Property

The media type describing the content.

public string ContentType { get; init; }

Property Value

System.String

MessageBody.Text Property

The text content of the message body.

public string Text { get; init; }

Property Value

System.String

Methods

MessageBody.Validate(NetworkContext) Method

Validates the text media type, character set, and body text constraints.

public override Meshline.Validation.ProtocolViolation? Validate(Meshline.Models.NetworkContext? context=null);

Parameters

context NetworkContext

The optional network context passed to nested validation when needed; field-only validation may ignore it.

Returns

ProtocolViolation
The first detected protocol violation, or null if the implemented checks pass.