Open ravero opened 3 years ago
@ravero I can see this being particularly useful for us while developing our app.
A few additional ideas:
Lazy
or not. I use lazy extensively in all my software to optimise service creation.I
prefix, with the first letter being in lower case. IMyService
will trigger MFractor to search the project domain for any type that matches IMyService
and suggest the result (MyApp.Services.IMyService
).@matthewrdev I agree with all your points.
I would still keep a text field on the dialog for customising the field name. Sometimes I want to simplify interfaces with compound names (like IServicesCollection
, a builtin type on the Microsoft DI engine for ASP.NET Core that I frequently simplify to services
).
The feature name is short and descriptive, I would go with it.
When working on a project with DI, constructor injection is the most common way of adding a dependency (which will be resolved later by the DI framework).
I've thought that it could be a code action. A suggested workflow:
Add service or dependency to class
a modal should be shown with a text field to search for a class or interface (with autocomplete as you type) and another to name the field.Example:
Other considerations: