rebus-org / Rebus.SqlServer

:bus: Microsoft SQL Server transport and persistence for Rebus
https://mookid.dk/category/rebus
Other
43 stars 44 forks source link

Saga serializer #77

Closed mathiasnohall closed 4 years ago

mathiasnohall commented 4 years ago

the actual use of the saga serializer configuration from rebus project

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

mookid8000 commented 4 years ago

Cool cool 😃 if you move the ISagaSerializer thing here, you can easily let it default to a DefaultSagaSerializer, which will use Rebus' built-in ObjectSerializer to do its thing – then we're absolutely sure that the default behavior is preserved.

If you then add an extension method to StandardConfigurer<ISagaStorage> that will enable doing something like this:

Configure.With(...)
    .(...)
    .Sagas(s => {
        s.StoreInSqlServer(...);
        s.UseSagaSerializer(new MyCustomSagaSerializer());
    })
    .Start();

then we've achieved what you're after, don't you think?

mathiasnohall commented 4 years ago

yes that makes sense :) I have moved the code now

mookid8000 commented 4 years ago

Hi again @mathiasnohall , it's great that you've moved the serializer here... I can see that the build is failing though, because of a missing comment on DefaultSagaSerializer: image

mathiasnohall commented 4 years ago

added comment :)

mookid8000 commented 4 years ago

Excellent! It's out in Rebus.SqlServer 7.1.0 on NuGet.org in a few minutes 🙂

Thanks for your contribution 👍