Class WolverineExtensions
Namespace: Momentum.ServiceDefaults.Messaging.Wolverine
Assembly: Momentum.ServiceDefaults.dll
Provides extension methods for Wolverine messaging components.
public static class WolverineExtensions
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
GetMessageName(Envelope, bool)
Gets the message name from a Wolverine envelope.
public static string GetMessageName(this Envelope envelope, bool fullName = false)
Parameters
envelope
Envelope
The Wolverine envelope containing the message.
fullName
bool
If true
, returns the full type name including namespace; if false
, returns only the type name. Defaults to false
.
Returns
The message type name. If the message type cannot be determined, returns the envelope's MessageType property or "UnknownMessage" as a fallback.
Remarks
This method is useful for logging and debugging purposes to identify the type of message being processed without requiring direct access to the message instance.