I'm using ASP.NET Core. A lot.
My project structure is as follows (example):
\Logic
public ILogicStuff
public IAdditionalLogicStuff
\Calculation
internal IAddition
internal ISubtraction
\Implementation
\Logic
internal LogicStuff : ILogicStuff
internal AdditionalLogicStuff : IAdditionalLogicStuff
\Calculation
internal Addition : IAddition
internal Subtraction : ISubtraction
I use my own "auto config" system which uses an attribute ([ImplementedBy(typeof(LogicStuff))]
) to setup IoC (kilometer long lists of "AddSingleton" here and "AddTransient" there are inacceptable). This is solved, I simply use reflection on service startup and iterate through the whole app domain. Works like a charm.
What I would like to implement:
- Right click in the solution
- "Add new IoC component"
- My plugin then creates:
- The interface (public in many cases, often also internal, but I think adding a checkbox here should be possible)
- The
[ImplementedBy]
attribute - The proper subdirectory under \Implementation if it doesn't exist
- The implementing class under \Implementation...
Is this doable with the ReSharper SDK so I can use this in Rider? I'm good in C# but have no clue when it comes to Java, so I'd prefer to use the ReSharper SDK.