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
To make Fellow Oak DICOM use Microsoft.Extensions.Logging, you need to use dependency injection.
If you are using the host builder from ASP.NET Core, you can do this:
varhost= Host.CreateDefaultBuilder(args).ConfigureLogging(logging =>{ logging.ClearProviders(); logging.AddConsole(); logging.SetMinimumLevel(LogLevel.Information);}).ConfigureServices(services =>{ services.AddFellowOakDicom(); services.AddHostedService<Worker>();// This will be injected into the DICOM service services.AddSingleton<CustomDependency>();}).Build();// This is still necessary for now, but we want to get rid of this in the long term
DicomSetupBuilder.UseServiceProvider(host.Services);
host.Run();
If you are not using the host builder, you'll need to make your own service collection:
The above post is gold - and is the first time I've seen a clear example of using DI with fo-dicom v5. Dependency injection documentation, samples would be very useful
The text was updated successfully, but these errors were encountered:
@amoerie as you suspected - it was exactly the issue you thought... the first x number of parameters MUST match exactly on type Thanks for your prompt assistance
To make Fellow Oak DICOM use Microsoft.Extensions.Logging, you need to use dependency injection.
If you are using the host builder from ASP.NET Core, you can do this:
If you are not using the host builder, you'll need to make your own service collection:
Originally posted by @amoerie in #1627 (comment)
The above post is gold - and is the first time I've seen a clear example of using DI with fo-dicom v5. Dependency injection documentation, samples would be very useful
The text was updated successfully, but these errors were encountered: