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

[FR] Update docstrings #17345

Merged
merged 3 commits into from
Dec 5, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Azure.AI.FormRecognizer.Training
{
/// <summary>
/// Contains general information about a Cognitive Services Account, such as the number
/// Contains general information about the Form Recognizer resource, such as the number
/// of models and account limits.
/// </summary>
public class AccountProperties
Expand All @@ -29,7 +29,7 @@ internal AccountProperties(int customModelCount, int customModelLimit)
}

/// <summary>
/// The current count of trained custom models.
/// The current count of trained custom models in this subscription.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public int CustomModelCount { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public override CustomFormModelInfo Value
public override bool HasValue => _value != null;

/// <summary>
/// Initializes a new instance of the <see cref="CopyModelOperation"/> class.
/// Initializes a new instance of the <see cref="CopyModelOperation"/> class which
/// tracks the status of the long-running operation for copying a custom model into a target Form Recognizer resource.
/// </summary>
/// <param name="operationId">The ID of this operation.</param>
/// <param name="targetModelId">Model ID in the target Form Recognizer resource.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
namespace Azure.AI.FormRecognizer.Training
{
/// <summary>
/// Tracks the status of a long-running operation for training a model from a collection of custom forms.
/// Tracks the status of a long-running operation for creating a composed model from a
/// collection of existing trained models with labels.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public class CreateComposedModelOperation : CreateCustomFormModelOperation
{
internal CreateComposedModelOperation(string location, FormRecognizerRestClient allOperations, ClientDiagnostics diagnostics) : base(location, allOperations, diagnostics) { }


/// <summary>
/// Initializes a new instance of the <see cref="TrainingOperation"/> class.
/// Initializes a new instance of the <see cref="CreateComposedModelOperation"/> class which
/// tracks the status of a long-running operation for creating a composed model from a
/// collection of existing trained models with labels.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
/// <param name="operationId">The ID of this operation.</param>
/// <param name="client">The client used to check for completion.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Azure.AI.FormRecognizer.Training
{
/// <summary>
/// Tracks the status of a long-running operation for training a model from a collection of custom forms.
/// Tracks the status of a long-running operation for creating a custom model.
/// </summary>
public class CreateCustomFormModelOperation : Operation<CustomFormModel>
{
Expand Down Expand Up @@ -73,7 +73,7 @@ public override CustomFormModel Value
/// </summary>
/// <remarks>
/// The last response returned from the server during the lifecycle of this instance.
/// An instance of <see cref="TrainingOperation"/> sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods.
/// An instance of <see cref="CreateCustomFormModelOperation"/> sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods.
/// Responses from these requests can be accessed using GetRawResponse.
/// </remarks>
public override Response GetRawResponse() => _response;
Expand Down Expand Up @@ -116,7 +116,8 @@ internal CreateCustomFormModelOperation(string location, FormRecognizerRestClien
}

/// <summary>
/// Initializes a new instance of the <see cref="TrainingOperation"/> class.
/// Initializes a new instance of the <see cref="CreateCustomFormModelOperation"/> class which
/// tracks the status of a long-running operation for creating a custom model.
/// </summary>
/// <param name="operationId">The ID of this operation.</param>
/// <param name="client">The client used to check for completion.</param>
Expand Down Expand Up @@ -159,7 +160,7 @@ private async ValueTask<Response> UpdateStatusAsync(bool async, CancellationToke
{
if (!_hasCompleted)
{
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TrainingOperation)}.{nameof(UpdateStatus)}");
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(CreateCustomFormModelOperation)}.{nameof(UpdateStatus)}");
maririos marked this conversation as resolved.
Show resolved Hide resolved
scope.Start();

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace Azure.AI.FormRecognizer.Training
{
/// <summary>
/// Properties of a model like for example if the model is a composed model.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
[CodeGenModel("Attributes")]
public partial class CustomFormModelProperties
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using Azure.Core;

namespace Azure.AI.FormRecognizer.Models
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum FieldValueType
Dictionary,

/// <summary>
/// Used for <see cref="FieldValueSelectionMark"/> type.
/// Used for Selection Mark type.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
SelectionMark
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Azure.AI.FormRecognizer.Models
{
/// <summary>
/// Represents a form element recognized from the input document. Its text can be a line,
/// a word, the content of a table cell, etc.
/// a word, the content of a table cell, a selection mark, etc.
/// </summary>
public abstract class FormElement
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public class FormField<T>
#pragma warning restore SA1649 // File name should match first type name
{
/// <summary>
/// Initializes a new instance of the <see cref="FormField{T}"/> class.
/// Initializes a new instance of the <see cref="FormField{T}"/> class which
/// represents a field recognized in the input form, where the field's value is of a known type.
/// </summary>
/// <param name="field">The weakly-typed field this instance is associated with.</param>
/// <param name="value">The strongly-typed value of this <see cref="FormField{T}"/>.</param>
Expand Down
7 changes: 4 additions & 3 deletions sdk/formrecognizer/Azure.AI.FormRecognizer/src/FormPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
namespace Azure.AI.FormRecognizer.Models
{
/// <summary>
/// Represents a page recognized from the input document. Contains lines, words, tables and page metadata.
/// Represents a page recognized from the input document. Contains lines, words, tables,
/// selection marks, and page meta data.
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public class FormPage
{
Expand Down Expand Up @@ -41,7 +42,7 @@ internal FormPage(PageResult pageResult, IReadOnlyList<ReadResult> readResults,
/// <param name="width">The width of the image/PDF in pixels/inches, respectively.</param>
/// <param name="height">The height of the image/PDF in pixels/inches, respectively.</param>
/// <param name="textAngle">The general orientation of the text in clockwise direction, measured in degrees between (-180, 180].</param>
/// <param name="unit">The unit used by the width, height and <see cref="FieldBoundingBox"/> properties. For images, the unit is &quot;pixel&quot;. For PDF, the unit is &quot;inch&quot;.</param>
/// <param name="unit">The unit used by the width, height and <see cref="FieldBoundingBox"/> properties. For images, the unit is "pixel". For PDF, the unit is "inch".</param>
maririos marked this conversation as resolved.
Show resolved Hide resolved
/// <param name="lines">A list of recognized lines of text.</param>
/// <param name="tables">A list of recognized tables contained in this page.</param>
/// <param name="selectionMarks">A list of recognized selection marks contained in this page.</param>
Expand Down Expand Up @@ -79,7 +80,7 @@ internal FormPage(int pageNumber, float width, float height, float textAngle, Le

/// <summary>
/// The unit used by the width, height and <see cref="FieldBoundingBox"/> properties. For images, the unit is
/// &quot;pixel&quot;. For PDF, the unit is &quot;inch&quot;.
/// "pixel". For PDF, the unit is "inch".
/// </summary>
public LengthUnit Unit { get; }

Expand Down
Loading