# Class MessageDto | EchoHub Documentation

# Class MessageDto

Namespace
  EchoHub.Core.DTOs

Assembly
  EchoHub.Core.dll

    public record MessageDto : IEquatable<MessageDto>

Inheritance
  object
  MessageDto

Implements
  IEquatable<MessageDto>

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.Equals(object, object)
  object.ReferenceEquals(object, object)

## Constructors

### MessageDto(MessageDto)

    protected MessageDto(MessageDto original)

#### Parameters

`original` MessageDto

### MessageDto(Guid, string, string, string?, string, DateTimeOffset, List<AttachmentDto>?, List<EmbedDto>?, string?, ReplyRefDto?)

    public MessageDto(Guid Id, string Content, string SenderUsername, string? SenderNicknameColor, string ChannelName, DateTimeOffset SentAt, List<AttachmentDto>? Attachments = null, List<EmbedDto>? Embeds = null, string? SenderDisplayName = null, ReplyRefDto? ReplyTo = null)

#### Parameters

`Id` Guid
`Content` string
`SenderUsername` string
`SenderNicknameColor` string
`ChannelName` string
`SentAt` DateTimeOffset
`Attachments` List<AttachmentDto>
`Embeds` List<EmbedDto>
`SenderDisplayName` string
`ReplyTo` ReplyRefDto

## Properties

### Attachments

    public List<AttachmentDto>? Attachments { get; init; }

#### Property Value

List<AttachmentDto>

### ChannelName

    public string ChannelName { get; init; }

#### Property Value

string

### Content

    public string Content { get; init; }

#### Property Value

string

### Embeds

    public List<EmbedDto>? Embeds { get; init; }

#### Property Value

List<EmbedDto>

### EqualityContract

    protected virtual Type EqualityContract { get; }

#### Property Value

Type

### Id

    public Guid Id { get; init; }

#### Property Value

Guid

### ReplyTo

    public ReplyRefDto? ReplyTo { get; init; }

#### Property Value

ReplyRefDto

### SenderDisplayName

    public string? SenderDisplayName { get; init; }

#### Property Value

string

### SenderNicknameColor

    public string? SenderNicknameColor { get; init; }

#### Property Value

string

### SenderUsername

    public string SenderUsername { get; init; }

#### Property Value

string

### SentAt

    public DateTimeOffset SentAt { get; init; }

#### Property Value

DateTimeOffset

## Methods

### Deconstruct(out Guid, out string, out string, out string?, out string, out DateTimeOffset, out List<AttachmentDto>?, out List<EmbedDto>?, out string?, out ReplyRefDto?)

    public void Deconstruct(out Guid Id, out string Content, out string SenderUsername, out string? SenderNicknameColor, out string ChannelName, out DateTimeOffset SentAt, out List<AttachmentDto>? Attachments, out List<EmbedDto>? Embeds, out string? SenderDisplayName, out ReplyRefDto? ReplyTo)

#### Parameters

`Id` Guid
`Content` string
`SenderUsername` string
`SenderNicknameColor` string
`ChannelName` string
`SentAt` DateTimeOffset
`Attachments` List<AttachmentDto>
`Embeds` List<EmbedDto>
`SenderDisplayName` string
`ReplyTo` ReplyRefDto

### Equals(MessageDto?)

    public virtual bool Equals(MessageDto? other)

#### Parameters

`other` MessageDto

#### Returns

bool

### Equals(object?)

    public override bool Equals(object? obj)

#### Parameters

`obj` object

#### Returns

bool

### GetHashCode()

    public override int GetHashCode()

#### Returns

int

### PrintMembers(StringBuilder)

    protected virtual bool PrintMembers(StringBuilder builder)

#### Parameters

`builder` StringBuilder

#### Returns

bool

### ToString()

    public override string ToString()

#### Returns

string

## Operators

### operator ==(MessageDto?, MessageDto?)

    public static bool operator ==(MessageDto? left, MessageDto? right)

#### Parameters

`left` MessageDto
`right` MessageDto

#### Returns

bool

### operator !=(MessageDto?, MessageDto?)

    public static bool operator !=(MessageDto? left, MessageDto? right)

#### Parameters

`left` MessageDto
`right` MessageDto

#### Returns

bool