Class PayloadAttribute
- Namespace
- Steeltoe.Messaging.Handler.Attributes
- Assembly
- Steeltoe.Messaging.Abstractions.dll
Attribute that binds a method parameter to the payload of a message. Can also be used to associate a payload to a method invocation.
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Parameter, AllowMultiple = false)]
public class PayloadAttribute : Attribute
- Inheritance
-
PayloadAttribute
- Inherited Members
Constructors
PayloadAttribute()
Initializes a new instance of the PayloadAttribute class.
public PayloadAttribute()
PayloadAttribute(string, bool)
Initializes a new instance of the PayloadAttribute class.
public PayloadAttribute(string expression, bool required = true)
Parameters
expression
stringexpression to be evaluated against the payload
required
boolwhether payload content is required
Properties
Expression
Gets or sets the expression to be evaluated against the payload
public virtual string Expression { get; set; }
Property Value
Required
Gets or sets a value indicating whether the payload content is required
public virtual bool Required { get; set; }