Class HeaderAttribute
- Namespace
- Silverback.Messaging.Messages
- Assembly
- Silverback.Integration.dll
Used to decorate a property which value must be produced/consumed as message header.
[AttributeUsage(AttributeTargets.Property)]
public sealed class HeaderAttribute : Attribute
- Inheritance
-
HeaderAttribute
- Inherited Members
Constructors
HeaderAttribute(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.
public HeaderAttribute(string headerName)
Parameters
headerNamestringThe name of the header.
Properties
HeaderName
Gets the name of the header.
public string HeaderName { get; }
Property Value
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.
public bool PublishDefaultValue { get; set; }