(C#) AutoRest generates public constructors that leave ServiceClient in an unusable state
AutoRest generates the following constructors in C# (using Azure Search's SearchServiceClient as an example):
public SearchServiceClient()
public SearchServiceClient(params DelegatingHandler[] handlers)
public SearchServiceClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
public SearchServiceClient(Uri baseUri, params DelegatingHandler[] handlers)
public SearchServiceClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers)
public SearchServiceClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers)
Most of these constructors do not take ServiceClientCredentials, and the Credentials property is not publicly settable. It seems that the constructors that do not take credentials should be private or maybe protected.
Also, is there a way in the Swagger to specify a derived class of ServiceClientCredentials? It would be nice if the constructors that do take credentials could be as strongly-typed as possible.
Tracking via: https://www.pivotaltracker.com/story/show/107070538
Fixed in dev
Thanks!