Skip to content

Commit

Permalink
[FormRecognizer] Remove Operation type constructors (#12419)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinelski authored Jun 2, 2020
1 parent 710bc50 commit f5f53e4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 36 deletions.
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

0 comments on commit f5f53e4

Please sign in to comment.