Skip to content

Class WolverineExtensions ​

Namespace: Momentum.ServiceDefaults.Messaging.Wolverine
Assembly: Momentum.ServiceDefaults.dll

Provides extension methods for Wolverine messaging components.

csharp
public static class WolverineExtensions

Inheritance ​

object ← WolverineExtensions

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.

csharp
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 ​

string

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.