Interface INewtonsoftJsonMessageSerializerBuilder
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Newtonsoft.dll
Syntax
public interface INewtonsoftJsonMessageSerializerBuilder
Methods
| Improve this doc View sourceConfigure(Action<JsonSerializerSettings>)
Configures the Newtonsoft.Json.JsonSerializerSettings.
Declaration
INewtonsoftJsonMessageSerializerBuilder Configure(Action<JsonSerializerSettings> configureAction)
Parameters
Type | Name | Description |
---|---|---|
Action<JsonSerializerSettings> | configureAction | An Action<T> that takes the Newtonsoft.Json.JsonSerializerSettings and configures it. |
Returns
Type | Description |
---|---|
INewtonsoftJsonMessageSerializerBuilder | The JsonMessageSerializerBuilder so that additional calls can be chained. |
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
INewtonsoftJsonMessageSerializerBuilder UseFixedType(Type messageType)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the message to serialize or deserialize. |
Returns
Type | Description |
---|---|
INewtonsoftJsonMessageSerializerBuilder | The JsonMessageSerializerBuilder so that additional calls can be chained. |
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
INewtonsoftJsonMessageSerializerBuilder UseFixedType<TMessage>()
Returns
Type | Description |
---|---|
INewtonsoftJsonMessageSerializerBuilder | The JsonMessageSerializerBuilder so that additional calls can be chained. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the message to serialize or deserialize. |
WithEncoding(MessageEncoding)
Specifies the encoding to be used.
Declaration
INewtonsoftJsonMessageSerializerBuilder WithEncoding(MessageEncoding encoding)
Parameters
Type | Name | Description |
---|---|---|
MessageEncoding | encoding | The MessageEncoding. |
Returns
Type | Description |
---|---|
INewtonsoftJsonMessageSerializerBuilder | The JsonMessageSerializerBuilder so that additional calls can be chained. |