Bond Serializer Usage

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

Configuring NServiceBus to use Bond

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

The message class

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

    public long Date { get; set; }

    public int CustomerId { get; set; }

Sending a message

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

  • Bond Serializer
    Serialization and deserialization with Microsoft Bond using the NServiceBus.Bond community package.
  • Serialization
    Information about how messages are serialized and deserialized on a transport.

Last modified