Table of Contents

Class MessageView

Namespace
idunno.Bluesky.Chat
Assembly
idunno.Bluesky.dll

Presents a view over a message.

public sealed record MessageView : MessageViewBase, IEquatable<View>, IEquatable<MessageViewBase>, IEquatable<MessageView>

Inheritance

Implements

Inherited Members

Constructors

MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)

Creates a new instance of idunno.Bluesky.Chat.MessageView.

public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)

Parameters

id string

The message ID.

revision string

The message revision.

text string

The text of the message.

facets IReadOnlyCollection<Facet>?

Facets to apply to the message text, if any.

embed EmbeddedRecordView?

A view over the embedded record in the message, if any.

reactions IReadOnlyCollection<ReactionView>?

Reactions to the message text, if any.

sender MessageViewSender

A view over the message author.

sentAt DateTimeOffset

The System.DateTimeOffset the message was sent on.

Exceptions

ArgumentException

Thrown when either id or revision is null or whitespace.

ArgumentNullException

Thrown when text or sender is null.

MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)

Creates a new instance of idunno.Bluesky.Chat.MessageView.

public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)

Parameters

id string

The message ID.

revision string

The message revision.

text string

The text of the message.

facets IReadOnlyCollection<Facet>?

Facets to apply to the message text, if any.

embed EmbeddedRecordView?

A view over the embedded record in the message, if any.

reactions IReadOnlyCollection<ReactionView>?

Reactions to the message text, if any.

sender MessageViewSender

A view over the message author.

sentAt DateTimeOffset

The System.DateTimeOffset the message was sent on.

Exceptions

ArgumentException

Thrown when either id or revision is null or whitespace.

ArgumentNullException

Thrown when text or sender is null.

MessageView(string, string, string, IReadOnlyCollection<Facet>?, EmbeddedRecordView?, IReadOnlyCollection<ReactionView>?, MessageViewSender, DateTimeOffset)

Creates a new instance of idunno.Bluesky.Chat.MessageView.

public MessageView(string id, string revision, string text, IReadOnlyCollection<Facet>? facets, EmbeddedRecordView? embed, IReadOnlyCollection<ReactionView>? reactions, MessageViewSender sender, DateTimeOffset sentAt)

Parameters

id string

The message ID.

revision string

The message revision.

text string

The text of the message.

facets IReadOnlyCollection<Facet>?

Facets to apply to the message text, if any.

embed EmbeddedRecordView?

A view over the embedded record in the message, if any.

reactions IReadOnlyCollection<ReactionView>?

Reactions to the message text, if any.

sender MessageViewSender

A view over the message author.

sentAt DateTimeOffset

The System.DateTimeOffset the message was sent on.

Exceptions

ArgumentException

Thrown when either id or revision is null or whitespace.

ArgumentNullException

Thrown when text or sender is null.

Properties

Embed

Gets a view over the embedded record, if any.

[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }

Property Value

EmbeddedRecordView?

Embed

Gets a view over the embedded record, if any.

[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }

Property Value

EmbeddedRecordView?

Embed

Gets a view over the embedded record, if any.

[JsonInclude]
public EmbeddedRecordView? Embed { get; init; }

Property Value

EmbeddedRecordView?

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Facets

Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.

[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }

Property Value

IReadOnlyCollection<Facet>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Facets

Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.

[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }

Property Value

IReadOnlyCollection<Facet>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Facets

Gets any facets to apply to idunno.Bluesky.Chat.MessageView.Text.

[JsonInclude]
public IReadOnlyCollection<Facet> Facets { get; init; }

Property Value

IReadOnlyCollection<Facet>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Id

Gets the id of a message.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Id

Gets the id of a message.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Id

Gets the id of a message.

[JsonInclude]
[JsonRequired]
public string Id { get; init; }

Property Value

string

Reactions

Gets reactions to the message, in ascending order of creation time.

[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }

Property Value

IReadOnlyCollection<ReactionView>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Reactions

Gets reactions to the message, in ascending order of creation time.

[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }

Property Value

IReadOnlyCollection<ReactionView>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Reactions

Gets reactions to the message, in ascending order of creation time.

[JsonInclude]
public IReadOnlyCollection<ReactionView> Reactions { get; init; }

Property Value

IReadOnlyCollection<ReactionView>

Remarks

The value supplied is copied, so later changes to the collection assigned are not reflected here. A null value is normalised to an empty collection.

Revision

Gets the revision of a message.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Revision

Gets the revision of a message.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Revision

Gets the revision of a message.

[JsonInclude]
[JsonRequired]
[JsonPropertyName("rev")]
public string Revision { get; init; }

Property Value

string

Sender

Gets a view over the message author.

[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }

Property Value

MessageViewSender

Sender

Gets a view over the message author.

[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }

Property Value

MessageViewSender

Sender

Gets a view over the message author.

[JsonInclude]
[JsonRequired]
public MessageViewSender Sender { get; init; }

Property Value

MessageViewSender

SentAt

Gets the System.DateTimeOffset the message was sent on.

[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }

Property Value

DateTimeOffset

SentAt

Gets the System.DateTimeOffset the message was sent on.

[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }

Property Value

DateTimeOffset

SentAt

Gets the System.DateTimeOffset the message was sent on.

[JsonInclude]
[JsonRequired]
public DateTimeOffset SentAt { get; init; }

Property Value

DateTimeOffset

Text

Gets the text of a message.

[JsonInclude]
[JsonRequired]
public string Text { get; init; }

Property Value

string

Text

Gets the text of a message.

[JsonInclude]
[JsonRequired]
public string Text { get; init; }

Property Value

string

Text

Gets the text of a message.

[JsonInclude]
[JsonRequired]
public string Text { get; init; }

Property Value

string

Methods

<Clone>$()

public override MessageView <Clone>$()

Returns

MessageView

<Clone>$()

public override MessageView <Clone>$()

Returns

MessageView

<Clone>$()

public override MessageView <Clone>$()

Returns

MessageView

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(MessageViewBase?)

public override sealed bool Equals(MessageViewBase? other)

Parameters

other MessageViewBase?

Returns

bool

Equals(MessageView?)

public bool Equals(MessageView? other)

Parameters

other MessageView?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(MessageViewBase?)

public override sealed bool Equals(MessageViewBase? other)

Parameters

other MessageViewBase?

Returns

bool

Equals(MessageView?)

public bool Equals(MessageView? other)

Parameters

other MessageView?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(MessageViewBase?)

public override sealed bool Equals(MessageViewBase? other)

Parameters

other MessageViewBase?

Returns

bool

Equals(MessageView?)

public bool Equals(MessageView? other)

Parameters

other MessageView?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

Operators

operator ==(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool

operator ==(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool

operator ==(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool

operator !=(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool

operator !=(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool

operator !=(MessageView?, MessageView?)

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

Parameters

left MessageView?
right MessageView?

Returns

bool