Bond Serializer Usage

Component: Bond Serializer
NuGet Package NServiceBus.Bond (2.x)
This is a community maintained project
Target NServiceBus Version: 7.x

Configuring to use Bond

var endpointConfiguration = new EndpointConfiguration("Samples.Serialization.Bond");

The message

public class CreateOrder :
    public int OrderId { get; set; }

    public long Date { get; set; }

    public int CustomerId { get; set; }

The message send

The message is decorated with Bond Attributes.

var message = new CreateOrder
    OrderId = 9,
    Date = DateTime.Now.Ticks,
    CustomerId = 12,
await endpointInstance.SendLocal(message)

Note that, for simplicity, this sample does not use Bond Code generation or the Bond.Compiler.CSharp/Bond.CSharp for schema to code generation.

Related Articles

Last modified