Class MessageHeader
An header added to the message being sent over a message broker.
Implements
Inherited Members
Namespace: Silverback.Messaging.Messages
Assembly: Silverback.Integration.dll
Syntax
public sealed class MessageHeader : IEquatable<MessageHeader>
Constructors
| Improve this doc View sourceMessageHeader(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
| Improve this doc View sourceName
Gets or sets the header name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Value
Gets or sets the header value.
Declaration
public string? Value { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Improve this doc View sourceEquals(MessageHeader?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(MessageHeader? other)
Parameters
Type | Name | Description |
---|---|---|
MessageHeader | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Improve this doc View sourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Operators
| Improve this doc View sourceoperator ==(MessageHeader?, MessageHeader?)
An 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?)
An 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 |