Class NewtonsoftJsonMessageSerializerBuilder
Implements
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Newtonsoft.dll
Syntax
public class NewtonsoftJsonMessageSerializerBuilder : INewtonsoftJsonMessageSerializerBuilder
Methods
| Improve this doc View sourceBuild()
Builds the IMessage
Declaration
public IMessageSerializer Build()
Returns
Type | Description |
---|---|
IMessage |
The IMessage |
Configure(Action<JsonSerializerSettings>)
Configures the Newtonsoft.
Declaration
public INewtonsoftJsonMessageSerializerBuilder Configure(Action<JsonSerializerSettings> configureAction)
Parameters
Type | Name | Description |
---|---|---|
Action<Json |
configureAction | An Action<T> that takes the Newtonsoft. |
Returns
Type | Description |
---|---|
INewtonsoft |
The Json |
UseFixedType(Type)
Specifies a fixed message type. This will prevent the message type header to be written when serializing and the header will be ignored when deserializing.
Declaration
public INewtonsoftJsonMessageSerializerBuilder UseFixedType(Type messageType)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the message to serialize or deserialize. |
Returns
Type | Description |
---|---|
INewtonsoft |
The Json |
UseFixedType<TMessage>()
Specifies a fixed message type. This will prevent the message type header to be written when serializing and the header will be ignored when deserializing.
Declaration
public INewtonsoftJsonMessageSerializerBuilder UseFixedType<TMessage>()
Returns
Type | Description |
---|---|
INewtonsoft |
The Json |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the message to serialize or deserialize. |
WithEncoding(MessageEncoding)
Specifies the encoding to be used.
Declaration
public INewtonsoftJsonMessageSerializerBuilder WithEncoding(MessageEncoding encoding)
Parameters
Type | Name | Description |
---|---|---|
Message |
encoding | The Message |
Returns
Type | Description |
---|---|
INewtonsoft |
The Json |