/// <summary> /// Initializes a new instance of the <see cref="SearchClientOptions"/> /// class. /// </summary> /// <param name="version"> /// An optional <see cref="ServiceVersion"/> to specify the version of /// the REST API to use. For more, see /// <see href="https://docs.microsoft.com/azure/search/search-api-versions" />. /// /// If not provided, the <paramref name="version"/> will default to the /// latest supported by this client library. It is recommended that /// application authors allow the version to float to the latest and /// library authors pin to a specific version. /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// Thrown when the <paramref name="version"/> is not supported by this /// client library. /// </exception> public SearchClientOptions(ServiceVersion version = LatestVersion) { Version = version.Validate(); AddLoggingHeaders(); AddLoggingQueryParameters(); }
/// <summary> /// Initializes a new instance of the <see cref="ManagedPrivateEndpointsClientOptions"/> /// class. /// </summary> /// <param name="version"> /// An optional <see cref="ServiceVersion"/> to specify the version of /// the REST API to use. /// If not provided, the <paramref name="version"/> will default to the /// latest supported by this client library. It is recommended that /// application authors allow the version to float to the latest and /// library authors pin to a specific version. /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// Thrown when the <paramref name="version"/> is not supported by this /// client library. /// </exception> public ManagedPrivateEndpointsClientOptions(ServiceVersion version = LatestVersion) { Version = version.Validate().ToVersionString(); }