Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Autofac dependency #5

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Remove Autofac dependency #5

merged 2 commits into from
Mar 23, 2024

Conversation

NotCoffee418
Copy link
Owner

BREAKING CHANGES!

  • Replacing Autofac with standard Microsoft DI
  • Minor improvements

Objective is to not force needless third party dependencies. But a lot of functionality would break for applications using this library without DI at all.
- Removing Autofac in favor of Microsoft DI since Autofac depends on it anyway.
- Move Application.RunAsync to OperationManager
@NotCoffee418 NotCoffee418 merged commit 082bce4 into main Mar 23, 2024
1 check failed
@NotCoffee418 NotCoffee418 deleted the dev branch July 23, 2024 07:54
@NotCoffee418
Copy link
Owner Author

NotCoffee418 commented Jul 23, 2024

For reference on upgrading my codebase

// from
public static void ConfigureLogger(this ContainerBuilder builder, IConfiguration configuration)
{
    // ...
    builder.RegisterInstance(Log.Logger).As<ILogger>();
}

// to
public static void ConfigureLogger(this IServiceCollection services, IConfiguration configuration)
{
    services.AddSingleton<ILogger>(Log.Logger);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant