Provide a way to help users integrate the driver with DI

Description

In .NET Framework there isn't a standardized way to do DI but in .NET Core, there is a unified API for Dependency Injection that Microsoft developed (Microsoft.Extensions.DependencyInjection).

Most C# libraries and frameworks offer extension methods that makes it easy for users to integrate the library with their existing DI implementation (especially AspNetCore projects).

One example (AppMetrics)

Configuring the DI container:
https://github.com/AppMetrics/Samples.V2/blob/master/AspNetCore2.VersionedApi.QuickStart/Startup.cs#L34

Enabling the feature:
https://github.com/AppMetrics/Samples.V2/blob/master/AspNetCore2.VersionedApi.QuickStart/Program.cs#L22

Proposal

My proposal is the following:

This is a very rough draft. Some use cases might not be covered in this proposal.
Also, similar extension methods should be added for the DSE driver with different names like services.AddDseCluster()

It might be enough to add an example to the examples directory in the github repo instead of creating a new package.

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Joao Reis

Labels

None

PM Priority

None

Fix versions

None

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

Size

None

Priority

Major
Configure