<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />

Microsoft.ApplicationInsights.Extensibility.Implementation.Endpoints.EndpointProvider

This class encapsulates parsing a connection string and returning an Endpoint's URI.
public string ConnectionString { get; set; }

Gets or sets the connection string. Connection String will be in the format: "key1=value1;key2=value2;key3=value3". Keywords are: InstrumentationKey, Authorization, Location, EndpointSuffix. Explicit Endpoint Keywords are: IngestionEndpoint, LiveEndpoint, ProfilerEndpoint, SnapshotEndpoint.

public Uri GetEndpoint(EndpointName endpointName)

Will evaluate connection string and return the requested endpoint.

public string GetInstrumentationKey()

Will evaluate connection string and return the requested instrumentation key.