Class PayloadAttribute
Attribute that binds a method parameter to the payload of a message. Can also be used to associate a payload to a method invocation.
Inheritance
System.Object
PayloadAttribute
Namespace: Steeltoe.Messaging.Handler.Attributes
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public class PayloadAttribute : Attribute
Constructors
| Edit this page View SourcePayloadAttribute()
Initializes a new instance of the PayloadAttribute class.
Declaration
public PayloadAttribute()
PayloadAttribute(String, Boolean)
Initializes a new instance of the PayloadAttribute class.
Declaration
public PayloadAttribute(string expression, bool required = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | expression | expression to be evaluated against the payload |
System.Boolean | required | whether payload content is required |
Properties
| Edit this page View SourceExpression
Gets or sets the expression to be evaluated against the payload
Declaration
public virtual string Expression { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Required
Gets or sets a value indicating whether the payload content is required
Declaration
public virtual bool Required { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |