Udostępnij za pośrednictwem


DocumentTranslationClient Constructors

Definition

Overloads

DocumentTranslationClient()

Protected constructor to allow mocking.

DocumentTranslationClient(Uri, AzureKeyCredential)

Initializes a new instance of DocumentTranslationClient class for the specified service instance.

DocumentTranslationClient(Uri, TokenCredential)

Initializes a new instance of the DocumentTranslationClient class for the specified service instance.

DocumentTranslationClient(Uri, AzureKeyCredential, DocumentTranslationClientOptions)

Initializes a new instance of DocumentTranslationClient.

DocumentTranslationClient(Uri, TokenCredential, DocumentTranslationClientOptions)

Initializes a new instance of DocumentTranslationClient.

DocumentTranslationClient()

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Protected constructor to allow mocking.

protected DocumentTranslationClient ();
Protected Sub New ()

Applies to

DocumentTranslationClient(Uri, AzureKeyCredential)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Initializes a new instance of DocumentTranslationClient class for the specified service instance.

public DocumentTranslationClient (Uri endpoint, Azure.AzureKeyCredential credential);
new Azure.AI.Translation.Document.DocumentTranslationClient : Uri * Azure.AzureKeyCredential -> Azure.AI.Translation.Document.DocumentTranslationClient
Public Sub New (endpoint As Uri, credential As AzureKeyCredential)

Parameters

endpoint
Uri

A Uri to the service the client sends requests to.

credential
AzureKeyCredential

The API key used to access the service. This will allow you to update the API key without creating a new client.

Applies to

DocumentTranslationClient(Uri, TokenCredential)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Initializes a new instance of the DocumentTranslationClient class for the specified service instance.

public DocumentTranslationClient (Uri endpoint, Azure.Core.TokenCredential credential);
new Azure.AI.Translation.Document.DocumentTranslationClient : Uri * Azure.Core.TokenCredential -> Azure.AI.Translation.Document.DocumentTranslationClient
Public Sub New (endpoint As Uri, credential As TokenCredential)

Parameters

endpoint
Uri

A Uri to the service the client sends requests to. Endpoint can be found in the Azure portal.

credential
TokenCredential

A TokenCredential used to authenticate requests to the service, such as DefaultAzureCredential.

Applies to

DocumentTranslationClient(Uri, AzureKeyCredential, DocumentTranslationClientOptions)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Initializes a new instance of DocumentTranslationClient.

public DocumentTranslationClient (Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Translation.Document.DocumentTranslationClientOptions options);
new Azure.AI.Translation.Document.DocumentTranslationClient : Uri * Azure.AzureKeyCredential * Azure.AI.Translation.Document.DocumentTranslationClientOptions -> Azure.AI.Translation.Document.DocumentTranslationClient
Public Sub New (endpoint As Uri, credential As AzureKeyCredential, options As DocumentTranslationClientOptions)

Parameters

endpoint
Uri

Supported document Translation endpoint, protocol and hostname, for example: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.

credential
AzureKeyCredential

A credential used to authenticate to an Azure Service.

options
DocumentTranslationClientOptions

The options for configuring the client.

Exceptions

endpoint or credential is null.

Applies to

DocumentTranslationClient(Uri, TokenCredential, DocumentTranslationClientOptions)

Source:
DocumentTranslationClient.cs
Source:
DocumentTranslationClient.cs

Initializes a new instance of DocumentTranslationClient.

public DocumentTranslationClient (Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Translation.Document.DocumentTranslationClientOptions options);
new Azure.AI.Translation.Document.DocumentTranslationClient : Uri * Azure.Core.TokenCredential * Azure.AI.Translation.Document.DocumentTranslationClientOptions -> Azure.AI.Translation.Document.DocumentTranslationClient
Public Sub New (endpoint As Uri, credential As TokenCredential, options As DocumentTranslationClientOptions)

Parameters

endpoint
Uri

Supported document Translation endpoint, protocol and hostname, for example: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.

credential
TokenCredential

A credential used to authenticate to an Azure Service.

options
DocumentTranslationClientOptions

The options for configuring the client.

Exceptions

endpoint or credential is null.

Applies to