Class MessageHeader
A header added to the message being sent over a message broker.
Implements
Inherited Members
Namespace: Silverback.Messaging.Messages
Assembly: Silverback.Integration.dll
Syntax
public record MessageHeader : IEquatable<MessageHeader>
Constructors
MessageHeader(MessageHeader)
A header added to the message being sent over a message broker.
Declaration
protected MessageHeader(MessageHeader original)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageHeader | original |
MessageHeader(string, object?)
Initializes a new instance of the MessageHeader class.
Declaration
public MessageHeader(string name, object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The header name. |
| object | value | The header value. |
MessageHeader(string, string?)
Initializes a new instance of the MessageHeader class.
Declaration
[JsonConstructor]
public MessageHeader(string name, string? value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The header name. |
| string | value | The header value. |
Properties
EqualityContract
A header added to the message being sent over a message broker.
Declaration
protected virtual Type EqualityContract { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Name
Gets the header name.
Declaration
public string Name { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Value
Gets the header value.
Declaration
public string? Value { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Equals(MessageHeader?)
A header added to the message being sent over a message broker.
Declaration
public virtual bool Equals(MessageHeader? other)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageHeader | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
A header added to the message being sent over a message broker.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
A header added to the message being sent over a message broker.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
PrintMembers(StringBuilder)
A header added to the message being sent over a message broker.
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | builder |
Returns
| Type | Description |
|---|---|
| bool |
ToString()
A header added to the message being sent over a message broker.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Operators
operator ==(MessageHeader?, MessageHeader?)
A header added to the message being sent over a message broker.
Declaration
public static bool operator ==(MessageHeader? left, MessageHeader? right)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageHeader | left | |
| MessageHeader | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(MessageHeader?, MessageHeader?)
A header added to the message being sent over a message broker.
Declaration
public static bool operator !=(MessageHeader? left, MessageHeader? right)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageHeader | left | |
| MessageHeader | right |
Returns
| Type | Description |
|---|---|
| bool |