-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Summary:
I'm currently using request scopes on my project and I'd like to start using the decorators, but it seems there is no support for request scope in the library.
Expected Behavior
I'd like to use the request scope on the decorated classes.
Current Behavior
The class ProvideInSyntax just has methods for singleton and transient scope, but no support for request scope.
Possible Solution
Add a new method to this class to support in request scope
public inRequestScope(): interfaces.ProvideWhenOnSyntax<T> {
let bindingWhenOnSyntax = (bind: inversifyInterfaces.Bind, target: any) => this._bindingInSyntax(bind, target).inRequestScope();
let inDoneSyntax = new ProvideDoneSyntax(bindingWhenOnSyntax);
let provideWhenSyntax = new ProvideWhenSyntax<T>(bindingWhenOnSyntax, inDoneSyntax);
let provideOnSyntax = new ProvideOnSyntax<T>(bindingWhenOnSyntax, inDoneSyntax);
return new ProvideWhenOnSyntax(provideWhenSyntax, provideOnSyntax);
}
tlyau62
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status