Class SingleMessageArgumentResolver
Resolves the parameters declared with a type that is compatible with the type of the message being published.
Inherited Members
Namespace: Silverback.Messaging.Subscribers.ArgumentResolvers
Assembly: Silverback.Core.dll
Syntax
public class SingleMessageArgumentResolver : ISingleMessageArgumentResolver, IMessageArgumentResolver, IArgumentResolver
Methods
| Improve this doc View sourceCanResolve(Type)
Returns a boolean value indicating whether this resolver instance can handle the parameter of the specified type.
Declaration
public bool CanResolve(Type parameterType)
Parameters
Type | Name | Description |
---|---|---|
Type | parameterType | The type of the parameter to be resolved. |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the specified parameter type can be handled. |
GetMessageType(Type)
Returns the actual message type in the specified parameter type (e.g. TMessage
for a parameter
declared as IEnumerable<TMessage>
.
Declaration
public Type GetMessageType(Type parameterType)
Parameters
Type | Name | Description |
---|---|---|
Type | parameterType | The type of the parameter to be resolved. |
Returns
Type | Description |
---|---|
Type | The actual message type. |
GetValue(object)
Returns the message value in a shape that is compatible with the subscribed method.
Declaration
public object GetValue(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message being published. |
Returns
Type | Description |
---|---|
object | The actual value to be forwarded to the subscribed method. |