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)]
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
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
expressionstringexpression to be evaluated against the payload
requiredboolwhether 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; }