NServiceBus.SerializationContextExtensions.SkipSerialization C# (CSharp) Method

SkipSerialization() public static method

Requests the serializer to skip serializing the message.
This can be used by an extension point needs to take control of the serialization. For example the Callbacks implementation that skips serialization and instead uses headers for passing the enum or int value.
public static SkipSerialization ( this context ) : void
context this
return void
        public static void SkipSerialization(this IOutgoingLogicalMessageContext context)
        {
            context.Extensions.Set("MessageSerialization.Skip", true);
        }
SerializationContextExtensions