Exemple #1
0
        private ManagedPrivateEndpointsClient CreateTestClient(ManagedPrivateEndpointsClientOptions.ServiceVersion version, HttpPipelineTransport transport)
        {
            var options = new ManagedPrivateEndpointsClientOptions(version)
            {
                Transport = transport
            };

            var client = InstrumentClient(new ManagedPrivateEndpointsClient(_url, new MockCredential(), options));

            return(client);
        }
 /// <summary>
 /// Validate a <see cref="ManagedPrivateEndpointsClientOptions.ServiceVersion"/>.
 /// </summary>
 /// <param name="version">
 /// The <see cref="ManagedPrivateEndpointsClientOptions.ServiceVersion"/> to validate.
 /// </param>
 /// <returns>
 /// The validated version.
 /// </returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// Thrown when the <paramref name="version"/> is not supported by this
 /// client library.
 /// </exception>
 public static ManagedPrivateEndpointsClientOptions.ServiceVersion Validate(this ManagedPrivateEndpointsClientOptions.ServiceVersion version) =>
 version switch
 {