You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Suppose we have a service that should be shared within the current remote call.
For example, each remote call should produce a single log file, and all services should write to this log file.
Multiple concurrent remote call should write to different files and not interfere with one another.
Describe the solution you'd like
This is a common concept known as scoped service lifetime.
It's supported by most IoC containers out of the box, i.e. Castle.Windsor, DryIoc, Autofac, Microsoft, etc.
The example task above is solved by registering a scoped logger service that creates a log file per remote call.
Describe alternatives you've considered
It's possible to write scoped containers in the user code using BeforeCall/AfterCall event to create scopes.
But then scoped services cannot be registered using the built-in DI container interface.
It becomes cumbersome and counterintuitive as opposed to the built-in scoped service support.
The text was updated successfully, but these errors were encountered:
yallie
added a commit
to yallie/CoreRemoting
that referenced
this issue
Jan 15, 2025
Is your feature request related to a problem? Please describe.
Suppose we have a service that should be shared within the current remote call.
For example, each remote call should produce a single log file, and all services should write to this log file.
Multiple concurrent remote call should write to different files and not interfere with one another.
Describe the solution you'd like
This is a common concept known as scoped service lifetime.
It's supported by most IoC containers out of the box, i.e. Castle.Windsor, DryIoc, Autofac, Microsoft, etc.
The example task above is solved by registering a scoped logger service that creates a log file per remote call.
Describe alternatives you've considered
It's possible to write scoped containers in the user code using BeforeCall/AfterCall event to create scopes.
But then scoped services cannot be registered using the built-in DI container interface.
It becomes cumbersome and counterintuitive as opposed to the built-in scoped service support.
The text was updated successfully, but these errors were encountered: