Allow UDT mappings to be defined before a session is created

Description

Currently, UDT mappings are exposed via a Session property.

With CSHARP-916, users should be able to inject a session instance into their DI framework of choice without having to explictly wait for a connection to be open. However, any user that is currently defining a UDT mapping will not be able to do that because calling session.UserDefinedTypes.DefineAsync(...) will wait for a connection to be open.

We can add a way to provide the UdtMap objects in the builder and have the driver call DefineAsync() for each UdtMap during session initialization.

Environment

None

Assignee

Unassigned

Reporter

Joao Reis

Labels

None

PM Priority

None

Fix versions

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

C# P-MAJOR-NEXT

Pull Requests

None

Size

None

Priority

Major
Configure