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

[FormRecognizer] Remove Operation type constructors #12419

Merged
merged 2 commits into from
Jun 2, 2020
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
1 change: 1 addition & 0 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- In preparation for service-side changes, `FieldValue.AsInt32` has been replaced by `FieldValue.AsInt64`, which returns a `long`.
- The order of the values for `USReceiptType` have changed so that `Other` has now a value of `1`.
- Parameter `useTrainingLabels` is now required for `FormTrainingClient.StartTraining`.
- Protected constructors have been removed from `Operation` types, such as `TrainingOperation` or `RecognizeContentOperation`.

### New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ internal CopyModelOperation(ServiceRestClient serviceClient, ClientDiagnostics d
Id = string.Join("/", substrs, substrs.Length - 3, 3);
}

/// <summary>
/// Initializes a new instance of the <see cref="CopyModelOperation"/> class.
/// </summary>
protected CopyModelOperation()
{
}


/// <inheritdoc/>
public override Response GetRawResponse() => _response;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ internal RecognizeContentOperation(ServiceRestClient serviceClient, string opera
Id = operationLocation.Split('/').Last();
}

/// <summary>
/// Initializes a new instance of the <see cref="RecognizeContentOperation"/> class.
/// </summary>
protected RecognizeContentOperation()
{
}

/// <inheritdoc/>
public override Response GetRawResponse() => _response;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ public RecognizeCustomFormsOperation(string operationId, FormRecognizerClient cl
Id = operationId;
}

/// <summary>
/// Initializes a new instance of the <see cref="RecognizeCustomFormsOperation"/> class.
/// </summary>
protected RecognizeCustomFormsOperation()
{
}

/// <inheritdoc/>
public override Response UpdateStatus(CancellationToken cancellationToken = default) =>
UpdateStatusAsync(false, cancellationToken).EnsureCompleted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ internal RecognizeReceiptsOperation(ServiceRestClient serviceClient, string oper
Id = operationLocation.Split('/').Last();
}

/// <summary>
/// Initializes a new instance of the <see cref="RecognizeReceiptsOperation"/> class.
/// </summary>
protected RecognizeReceiptsOperation()
{
}

/// <inheritdoc/>
public override ValueTask<Response<RecognizedReceiptCollection>> WaitForCompletionAsync(CancellationToken cancellationToken = default) =>
this.DefaultWaitForCompletionAsync(cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ public override ValueTask<Response<CustomFormModel>> WaitForCompletionAsync(Canc
public override ValueTask<Response<CustomFormModel>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) =>
this.DefaultWaitForCompletionAsync(pollingInterval, cancellationToken);

/// <summary>
/// Initializes a new instance of the <see cref="TrainingOperation"/> class for mocking.
/// </summary>
protected TrainingOperation()
{
}

internal TrainingOperation(string location, ServiceRestClient allOperations)
{
_serviceClient = allOperations;
Expand Down