Skip to content

Commit

Permalink
[FR] Update to 2.1-preview.2 with generation and recordings (#16462)
Browse files Browse the repository at this point in the history
* generation and recordings

* missing tests

* PR feedback

* enable test

* export-api
  • Loading branch information
maririos authored Oct 30, 2020
1 parent eb7c0ed commit 1f9df06
Show file tree
Hide file tree
Showing 144 changed files with 31,769 additions and 32,266 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public enum FormContentType
Png = 2,
Jpeg = 3,
Tiff = 4,
Bmp = 5,
}
public partial class FormRecognizerClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,11 @@ public enum FormContentType
/// </summary>
[CodeGenMember("ImageTiff")]
Tiff,

/// <summary>
/// Used for BMP files.
/// </summary>
[CodeGenMember("ImageBmp")]
Bmp,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public virtual RecognizeContentOperation StartRecognizeContent(Stream form, Reco
{
FormContentType contentType = recognizeContentOptions.ContentType ?? DetectContentType(form, nameof(form));

Response response = ServiceClient.AnalyzeLayoutAsync(contentType, form, cancellationToken);
Response response = ServiceClient.AnalyzeLayoutAsync(contentType, form, null, cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeContentOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -170,7 +170,7 @@ public virtual async Task<RecognizeContentOperation> StartRecognizeContentAsync(
{
FormContentType contentType = recognizeContentOptions.ContentType ?? DetectContentType(form, nameof(form));

Response response = await ServiceClient.AnalyzeLayoutAsyncAsync(contentType, form, cancellationToken).ConfigureAwait(false);
Response response = await ServiceClient.AnalyzeLayoutAsyncAsync(contentType, form, null, cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeContentOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -202,7 +202,7 @@ public virtual RecognizeContentOperation StartRecognizeContentFromUri(Uri formUr
try
{
SourcePath sourcePath = new SourcePath() { Source = formUri.AbsoluteUri };
Response response = ServiceClient.AnalyzeLayoutAsync(sourcePath, cancellationToken);
Response response = ServiceClient.AnalyzeLayoutAsync(null, sourcePath, cancellationToken);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeContentOperation(ServiceClient, Diagnostics, location);
Expand Down Expand Up @@ -234,7 +234,7 @@ public virtual async Task<RecognizeContentOperation> StartRecognizeContentFromUr
try
{
SourcePath sourcePath = new SourcePath() { Source = formUri.AbsoluteUri };
Response response = await ServiceClient.AnalyzeLayoutAsyncAsync(sourcePath, cancellationToken).ConfigureAwait(false);
Response response = await ServiceClient.AnalyzeLayoutAsyncAsync(null, sourcePath, cancellationToken).ConfigureAwait(false);
string location = ClientCommon.GetResponseHeader(response.Headers, Constants.OperationLocationHeader);

return new RecognizeContentOperation(ServiceClient, Diagnostics, location);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f9df06

Please sign in to comment.