autofac / Autofac.ServiceFabric

Autofac integration for Azure Service Fabric. Provides service factory implementations for Actors, Stateful Services and Stateless Services.
MIT License
26 stars 27 forks source link

Add 'InstancePerService' lifetime support #10

Closed alexperovich closed 7 years ago

alexperovich commented 7 years ago

This change implements an InstancePerService lifetime that enables one instance per service fabric service instance.

alexmg commented 7 years ago

Thanks for the PR. I am going to stick with InstancePerLifetimeScope for this integration. The tagged instances have caused confusion in past integrations, especially when a service was to be available in multiple contexts, such as inside Service Fabric and some other application. This is also consistent with how lifetime scopes now work with ASP.NET 5 (no specific lifetime scope tag).

I have pushed 1.0.0-beta2 with your previous PR to NuGet.