So it is a technical IDE question:
Let's say that I have blazor:
builder.Services.AddTransient<IHttpClient, HttpClient>();
and the httpClient looks like this:
public interface IHttpSowClient
{
Task<List<Client>> SearchForClients(string searchKey);
}
public class HttpClient : IHttpClient
{
private readonly IBaseHttpService _http;
public HttpSowClient(IBaseHttpService http)
{
_http = http;
}
public async Task<List<KlientSOW>> SearchForClients(string searchKey)
{
//some logic
}
}
And now in some component, I have of course @inject IHttpClient _http;
And the question is – is there any way to configure Visual Studio or maybe some other IDE?
To allow me in this component when I have like:
protected override async Task OnInitializedAsync()
{
var x = _http.SearchForClients("test");
}
To when I press f12 on this SearchForClients for it to redirect me to the correct implemented method in HttpClient
and not to interface IHttpSowClient
method description** ??
And a similar question:
When I do var x = _http.SearchForClientsHavingSomething("test");
Is there any way for it to be known that should also allow me via IntelliSense to GENERATE method SearchForClientsHavingSomething
in BOTH – interface and implementation** that is configured via startup or even in EVERY implementation that uses this interface???
It would be really helping me out / I like these features a lot and when doing it via interfaces for testing purposes I lost these features that I really like and use.
Please advise how You handle this. Do You always do this manually?