Nullable client properties.
I find it odd that these two standard client properties are nullable (which comes from not being required).
Since there are default values, per the doc comment, when would either one ever be null?
/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running
/// Operations. Default value is 30.
/// </summary>
int? LongRunningOperationRetryTimeout { get; set; }
/// <summary>
/// When set to true a unique x-ms-client-request-id value is
/// generated and included in each request. Default is true.
/// </summary>
bool? GenerateClientRequestId { get; set; }
@NiklasGustafsson is there ever a case where someone would deliberately set those to null?
It's nullable in IAzureClient in the client runtime. Not sure we can do much with this without risking a breaking change.
I can't think of a reason why you would set it to null.
Weird -- just found this: https://github.com/Azure/autorest/pull/91 anyone know why?
Not sure why, but not all clients expose long-running operations, so the LongRunningRetryOperationTimeout property is not always relevant (see https://github.com/Azure/autorest/issues/1441). There are better ways than nullable to deal with that though.
I agree -- even if it's not used a, reference to an int costs no less bytes than the int...
I'm gonna dig a bit more ...
I never did find out why this was made to do this.
We've moved the C# ClientRuntime to the https://github.com/Azure/azure-sdk-for-net/ repository.
If this is still of concern, please file an issue in that project.
@fearthecowboy This isn't a ClientRuntime issue as these properties are included in the generated ServiceClient-derived classes by AutoRest.
I'm fine with this issue being closed though, as I have another issue tracking this: https://github.com/Azure/autorest/issues/1441