Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMessageSerializer is not registered in DI and cannot be injected when replacing SerializeMessageConnector #7076

Open
ramonsmits opened this issue Jun 20, 2024 · 0 comments

Comments

@ramonsmits
Copy link
Member

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

When a user would want to override SerializeMessageConnector the currently configured serialized cannot be injected via IMessageSerializer.

Describe the suggested solution

Register IMessageSerializer during serializer feature setup.

Describe alternatives you've considered

There is a hack to obtain it, but is will not be the same instance and require knowledge of the private string key "MainSerializer":

var settings = context.Settings;
var mainSerializer = settings.Get<Tuple<SerializationDefinition, SettingsHolder>>("MainSerializer");
var serializerFactory = mainSerializer.Item1.Configure(settings);
var serializer = serializerFactory(new MessageMapper());          

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant