Skip to content

Introduce fluent configuration #5

@rafek1241

Description

@rafek1241

Currently, there is an options class that contains all settings and it is included in the extension method. It should be possible to set it up fluently by method chaining.

Current:

//rebus configuration
...
                   .Serialization(
                        r => r
                            .UseXmlSerializing(
                                logger,
                                new XmlSerializingOptions()
                                {
                                    IncludeNamespace = true,
                                    DefaultNamespacePrefix = "http://tempuri.net"
                                }
                            )
                    )

Expected:

                   .Serialization(
                        r => r
                            .UseXmlSerializing()
                                .WithLogger(logger)
                                .IncludeNamespace()
                                .WithNamespacePrefix("http://tempuri.net")
                    )

and

var config = new XmlSerializerConfig()
                                .WithLogger(logger)
                                .IncludeNamespace()
                                .WithNamespacePrefix("http://tempuri.net");

...
                   .Serialization(r=> r.UseXmlSerializing(config))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions