Class HeaderAttribute
Used to decorate a property which value must be produced/consumed as message header.
Inherited Members
Namespace: Silverback.Messaging.Messages
Assembly: Silverback.Integration.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class HeaderAttribute : Attribute
Constructors
| Improve this doc View sourceHeaderAttribute(string)
Initializes a new instance of the HeaderAttribute class specifying the name of the header. When a property is decorated with this attribute its value will be produced/consumed as message header.
Declaration
public HeaderAttribute(string headerName)
Parameters
Type | Name | Description |
---|---|---|
string | headerName | The name of the header. |
Properties
| Improve this doc View sourceHeaderName
Gets the name of the header.
Declaration
public string HeaderName { get; }
Property Value
Type | Description |
---|---|
string |
PublishDefaultValue
Gets or sets a value indicating whether the header must be produced even if the property is set to the default value for its declaring type.
Declaration
public bool PublishDefaultValue { get; set; }
Property Value
Type | Description |
---|---|
bool |