xml/Azure.AI.ContentSafety/ContentSafetyClient.xml (2,183 lines of code) (raw):
<Type Name="ContentSafetyClient" FullName="Azure.AI.ContentSafety.ContentSafetyClient">
<TypeSignature Language="C#" Value="public class ContentSafetyClient" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ContentSafetyClient extends System.Object" />
<TypeSignature Language="DocId" Value="T:Azure.AI.ContentSafety.ContentSafetyClient" />
<TypeSignature Language="VB.NET" Value="Public Class ContentSafetyClient" />
<TypeSignature Language="F#" Value="type ContentSafetyClient = class" />
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary> The ContentSafety service client. </summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ContentSafetyClient ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary> Initializes a new instance of ContentSafetyClient for mocking. </summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContentSafetyClient (Uri endpoint, Azure.AzureKeyCredential credential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.AzureKeyCredential credential) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.#ctor(System.Uri,Azure.AzureKeyCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As AzureKeyCredential)" />
<MemberSignature Language="F#" Value="new Azure.AI.ContentSafety.ContentSafetyClient : Uri * Azure.AzureKeyCredential -> Azure.AI.ContentSafety.ContentSafetyClient" Usage="new Azure.AI.ContentSafety.ContentSafetyClient (endpoint, credential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.AzureKeyCredential" />
</Parameters>
<Docs>
<param name="endpoint">
Supported Cognitive Services endpoints (protocol and hostname, for example:
https://<resource-name>.cognitiveservices.azure.com).
</param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<summary> Initializes a new instance of ContentSafetyClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContentSafetyClient (Uri endpoint, Azure.Core.TokenCredential credential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.#ctor(System.Uri,Azure.Core.TokenCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential)" />
<MemberSignature Language="F#" Value="new Azure.AI.ContentSafety.ContentSafetyClient : Uri * Azure.Core.TokenCredential -> Azure.AI.ContentSafety.ContentSafetyClient" Usage="new Azure.AI.ContentSafety.ContentSafetyClient (endpoint, credential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="endpoint">
Supported Cognitive Services endpoints (protocol and hostname, for example:
https://<resource-name>.cognitiveservices.azure.com).
</param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<summary> Initializes a new instance of ContentSafetyClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContentSafetyClient (Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.ContentSafety.ContentSafetyClientOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.AzureKeyCredential credential, class Azure.AI.ContentSafety.ContentSafetyClientOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.#ctor(System.Uri,Azure.AzureKeyCredential,Azure.AI.ContentSafety.ContentSafetyClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As AzureKeyCredential, options As ContentSafetyClientOptions)" />
<MemberSignature Language="F#" Value="new Azure.AI.ContentSafety.ContentSafetyClient : Uri * Azure.AzureKeyCredential * Azure.AI.ContentSafety.ContentSafetyClientOptions -> Azure.AI.ContentSafety.ContentSafetyClient" Usage="new Azure.AI.ContentSafety.ContentSafetyClient (endpoint, credential, options)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.AzureKeyCredential" />
<Parameter Name="options" Type="Azure.AI.ContentSafety.ContentSafetyClientOptions" />
</Parameters>
<Docs>
<param name="endpoint">
Supported Cognitive Services endpoints (protocol and hostname, for example:
https://<resource-name>.cognitiveservices.azure.com).
</param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<param name="options"> The options for configuring the client. </param>
<summary> Initializes a new instance of ContentSafetyClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContentSafetyClient (Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.ContentSafety.ContentSafetyClientOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential, class Azure.AI.ContentSafety.ContentSafetyClientOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.#ctor(System.Uri,Azure.Core.TokenCredential,Azure.AI.ContentSafety.ContentSafetyClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential, options As ContentSafetyClientOptions)" />
<MemberSignature Language="F#" Value="new Azure.AI.ContentSafety.ContentSafetyClient : Uri * Azure.Core.TokenCredential * Azure.AI.ContentSafety.ContentSafetyClientOptions -> Azure.AI.ContentSafety.ContentSafetyClient" Usage="new Azure.AI.ContentSafety.ContentSafetyClient (endpoint, credential, options)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" Index="1" FrameworkAlternate="azure-dotnet" />
<Parameter Name="options" Type="Azure.AI.ContentSafety.ContentSafetyClientOptions" Index="2" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="endpoint">
Supported Cognitive Services endpoints (protocol and hostname, for example:
https://<resource-name>.cognitiveservices.azure.com).
</param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<param name="options"> The options for configuring the client. </param>
<summary> Initializes a new instance of ContentSafetyClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName="AddBlockItems">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult> AddBlockItems (string blocklistName, Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AddBlockItemsResult> AddBlockItems(string blocklistName, class Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItems(System.String,Azure.AI.ContentSafety.AddBlockItemsOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddBlockItems (blocklistName As String, addBlockItemsOptions As AddBlockItemsOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AddBlockItemsResult)" />
<MemberSignature Language="F#" Value="abstract member AddBlockItems : string * Azure.AI.ContentSafety.AddBlockItemsOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>
override this.AddBlockItems : string * Azure.AI.ContentSafety.AddBlockItemsOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>" Usage="contentSafetyClient.AddBlockItems (blocklistName, addBlockItemsOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="addBlockItemsOptions" Type="Azure.AI.ContentSafety.AddBlockItemsOptions" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="addBlockItemsOptions"> The request of adding blockItems to text blocklist. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Add BlockItems To Text Blocklist. </summary>
<returns>To be added.</returns>
<remarks> Add blockItems to a text blocklist. You can add at most 100 BlockItems in one request. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="addBlockItemsOptions" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call AddBlockItems with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[]
{
new TextBlockItemInfo("<text>")
{
Description = "<Description>",
}
});
var result = client.AddBlockItems("<blocklistName>", addBlockItemsOptions);
]]></code></example>
</Docs>
</Member>
<Member MemberName="AddBlockItems">
<MemberSignature Language="C#" Value="public virtual Azure.Response AddBlockItems (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response AddBlockItems(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItems(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddBlockItems (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member AddBlockItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.AddBlockItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.AddBlockItems (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Add BlockItems To Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItems(System.String,Azure.AI.ContentSafety.AddBlockItemsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AddBlockItems with required parameters and request content and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blockItems = new[] {
new {
description = "<description>",
text = "<text>",
}
},
};
Response response = client.AddBlockItems("<blocklistName>", RequestContent.Create(data), new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AddBlockItemsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>> AddBlockItemsAsync (string blocklistName, Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AddBlockItemsResult>> AddBlockItemsAsync(string blocklistName, class Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItemsAsync(System.String,Azure.AI.ContentSafety.AddBlockItemsOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddBlockItemsAsync (blocklistName As String, addBlockItemsOptions As AddBlockItemsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AddBlockItemsResult))" />
<MemberSignature Language="F#" Value="abstract member AddBlockItemsAsync : string * Azure.AI.ContentSafety.AddBlockItemsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>>
override this.AddBlockItemsAsync : string * Azure.AI.ContentSafety.AddBlockItemsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>>" Usage="contentSafetyClient.AddBlockItemsAsync (blocklistName, addBlockItemsOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AddBlockItemsResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="addBlockItemsOptions" Type="Azure.AI.ContentSafety.AddBlockItemsOptions" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="addBlockItemsOptions"> The request of adding blockItems to text blocklist. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Add BlockItems To Text Blocklist. </summary>
<returns>To be added.</returns>
<remarks> Add blockItems to a text blocklist. You can add at most 100 BlockItems in one request. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="addBlockItemsOptions" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call AddBlockItemsAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[]
{
new TextBlockItemInfo("<text>")
{
Description = "<Description>",
}
});
var result = await client.AddBlockItemsAsync("<blocklistName>", addBlockItemsOptions);
]]></code></example>
</Docs>
</Member>
<Member MemberName="AddBlockItemsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> AddBlockItemsAsync (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> AddBlockItemsAsync(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItemsAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddBlockItemsAsync (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member AddBlockItemsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AddBlockItemsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.AddBlockItemsAsync (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Add BlockItems To Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AddBlockItemsAsync(System.String,Azure.AI.ContentSafety.AddBlockItemsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AddBlockItemsAsync with required parameters and request content and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blockItems = new[] {
new {
description = "<description>",
text = "<text>",
}
},
};
Response response = await client.AddBlockItemsAsync("<blocklistName>", RequestContent.Create(data), new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeImage">
<MemberSignature Language="C#" Value="public virtual Azure.Response AnalyzeImage (Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response AnalyzeImage(class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImage(Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImage (content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImage : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.AnalyzeImage : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.AnalyzeImage (content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Analyze Image
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImage(Azure.AI.ContentSafety.AnalyzeImageOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="content" /> is null. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AnalyzeImage and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
image = new object(),
});
Response response = client.AnalyzeImage(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
]]></code>
This sample shows how to call AnalyzeImage with all request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
image = new
{
content = new object(),
blobUrl = "http://localhost:3000",
},
categories = new object[]
{
"Hate"
},
outputType = "FourSeverityLevels",
});
Response response = client.AnalyzeImage(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeImage">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage (BinaryData content, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage(class System.BinaryData content, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImage(System.BinaryData,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImage (content As BinaryData, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeImageResult)" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImage : BinaryData * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>
override this.AnalyzeImage : BinaryData * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>" Usage="contentSafetyClient.AnalyzeImage (content, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="System.BinaryData" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="content">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Image with Binary Data. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeImage">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage (Uri blobUri, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage(class System.Uri blobUri, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImage(System.Uri,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImage (blobUri As Uri, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeImageResult)" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImage : Uri * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>
override this.AnalyzeImage : Uri * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>" Usage="contentSafetyClient.AnalyzeImage (blobUri, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blobUri" Type="System.Uri" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="blobUri">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Image with Blob URI. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeImage">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage (Azure.AI.ContentSafety.AnalyzeImageOptions options, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage(class Azure.AI.ContentSafety.AnalyzeImageOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImage(Azure.AI.ContentSafety.AnalyzeImageOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImage (options As AnalyzeImageOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeImageResult)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImage : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>
override this.AnalyzeImage : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>" Usage="contentSafetyClient.AnalyzeImage (options, cancellationToken)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage (Azure.AI.ContentSafety.AnalyzeImageOptions body, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult> AnalyzeImage(class Azure.AI.ContentSafety.AnalyzeImageOptions body, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImage (body As AnalyzeImageOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeImageResult)" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImage : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>
override this.AnalyzeImage : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>" Usage="contentSafetyClient.AnalyzeImage (body, cancellationToken)" FrameworkAlternate="azure-dotnet-preview" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="Azure.AI.ContentSafety.AnalyzeImageOptions" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="body" Type="Azure.AI.ContentSafety.AnalyzeImageOptions" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" />
</Parameters>
<Docs>
<param name="options"> The image analysis request. </param>
<param name="body"> The analysis request of the image. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Analyze Image. </summary>
<returns>To be added.</returns>
<remarks> A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="options" /> is null. </exception>
<example>
This sample shows how to call AnalyzeImage.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData());
Response<AnalyzeImageResult> response = client.AnalyzeImage(options);
]]></code>
This sample shows how to call AnalyzeImage with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData())
{
Categories = { ImageCategory.Hate },
OutputType = AnalyzeImageOutputType.FourSeverityLevels,
};
Response<AnalyzeImageResult> response = client.AnalyzeImage(options);
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeImageAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> AnalyzeImageAsync (Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> AnalyzeImageAsync(class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImageAsync(Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImageAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImageAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AnalyzeImageAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.AnalyzeImageAsync (content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Analyze Image
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImageAsync(Azure.AI.ContentSafety.AnalyzeImageOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="content" /> is null. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AnalyzeImageAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
image = new object(),
});
Response response = await client.AnalyzeImageAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
]]></code>
This sample shows how to call AnalyzeImageAsync with all request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
image = new
{
content = new object(),
blobUrl = "http://localhost:3000",
},
categories = new object[]
{
"Hate"
},
outputType = "FourSeverityLevels",
});
Response response = await client.AnalyzeImageAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeImageAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync (BinaryData content, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync(class System.BinaryData content, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImageAsync(System.BinaryData,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImageAsync (content As BinaryData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeImageResult))" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImageAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>
override this.AnalyzeImageAsync : BinaryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>" Usage="contentSafetyClient.AnalyzeImageAsync (content, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="System.BinaryData" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="content">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Image with Binary Data Async. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeImageAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync (Uri blobUri, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync(class System.Uri blobUri, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImageAsync(System.Uri,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImageAsync (blobUri As Uri, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeImageResult))" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImageAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>
override this.AnalyzeImageAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>" Usage="contentSafetyClient.AnalyzeImageAsync (blobUri, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blobUri" Type="System.Uri" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="blobUri">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Image with Blob URI Async. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeImageAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync (Azure.AI.ContentSafety.AnalyzeImageOptions options, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync(class Azure.AI.ContentSafety.AnalyzeImageOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeImageAsync(Azure.AI.ContentSafety.AnalyzeImageOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImageAsync (options As AnalyzeImageOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeImageResult))" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImageAsync : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>
override this.AnalyzeImageAsync : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>" Usage="contentSafetyClient.AnalyzeImageAsync (options, cancellationToken)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync (Azure.AI.ContentSafety.AnalyzeImageOptions body, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeImageResult>> AnalyzeImageAsync(class Azure.AI.ContentSafety.AnalyzeImageOptions body, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeImageAsync (body As AnalyzeImageOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeImageResult))" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="F#" Value="abstract member AnalyzeImageAsync : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>
override this.AnalyzeImageAsync : Azure.AI.ContentSafety.AnalyzeImageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>>" Usage="contentSafetyClient.AnalyzeImageAsync (body, cancellationToken)" FrameworkAlternate="azure-dotnet-preview" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeImageResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="Azure.AI.ContentSafety.AnalyzeImageOptions" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="body" Type="Azure.AI.ContentSafety.AnalyzeImageOptions" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" />
</Parameters>
<Docs>
<param name="options"> The image analysis request. </param>
<param name="body"> The analysis request of the image. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Analyze Image. </summary>
<returns>To be added.</returns>
<remarks> A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="options" /> is null. </exception>
<example>
This sample shows how to call AnalyzeImageAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData());
Response<AnalyzeImageResult> response = await client.AnalyzeImageAsync(options);
]]></code>
This sample shows how to call AnalyzeImageAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData())
{
Categories = { ImageCategory.Hate },
OutputType = AnalyzeImageOutputType.FourSeverityLevels,
};
Response<AnalyzeImageResult> response = await client.AnalyzeImageAsync(options);
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeText">
<MemberSignature Language="C#" Value="public virtual Azure.Response AnalyzeText (Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response AnalyzeText(class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeText(Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeText (content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member AnalyzeText : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.AnalyzeText : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.AnalyzeText (content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Analyze Text
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeText(Azure.AI.ContentSafety.AnalyzeTextOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="content" /> is null. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AnalyzeText and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
text = "<text>",
});
Response response = client.AnalyzeText(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
]]></code>
This sample shows how to call AnalyzeText with all request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
text = "<text>",
categories = new object[]
{
"Hate"
},
blocklistNames = new object[]
{
"<blocklistNames>"
},
haltOnBlocklistHit = true,
outputType = "FourSeverityLevels",
});
Response response = client.AnalyzeText(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString());
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeText">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText (string text, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText(string text, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeText(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeText (text As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeTextResult)" />
<MemberSignature Language="F#" Value="abstract member AnalyzeText : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>
override this.AnalyzeText : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>" Usage="contentSafetyClient.AnalyzeText (text, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="text">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Text. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeText">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText (Azure.AI.ContentSafety.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText(class Azure.AI.ContentSafety.AnalyzeTextOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeText(Azure.AI.ContentSafety.AnalyzeTextOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeText (options As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeTextResult)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="F#" Value="abstract member AnalyzeText : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>
override this.AnalyzeText : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>" Usage="contentSafetyClient.AnalyzeText (options, cancellationToken)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText (Azure.AI.ContentSafety.AnalyzeTextOptions body, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult> AnalyzeText(class Azure.AI.ContentSafety.AnalyzeTextOptions body, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeText (body As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeTextResult)" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="F#" Value="abstract member AnalyzeText : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>
override this.AnalyzeText : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>" Usage="contentSafetyClient.AnalyzeText (body, cancellationToken)" FrameworkAlternate="azure-dotnet-preview" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="Azure.AI.ContentSafety.AnalyzeTextOptions" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="body" Type="Azure.AI.ContentSafety.AnalyzeTextOptions" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" />
</Parameters>
<Docs>
<param name="options"> The text analysis request. </param>
<param name="body"> The request of text analysis. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Analyze Text. </summary>
<returns>To be added.</returns>
<remarks> A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="options" /> is null. </exception>
<example>
This sample shows how to call AnalyzeText.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeTextOptions options = new AnalyzeTextOptions("<text>");
Response<AnalyzeTextResult> response = client.AnalyzeText(options);
]]></code>
This sample shows how to call AnalyzeText with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeTextOptions options = new AnalyzeTextOptions("<text>")
{
Categories = { TextCategory.Hate },
BlocklistNames = { "<blocklistNames>" },
HaltOnBlocklistHit = true,
OutputType = AnalyzeTextOutputType.FourSeverityLevels,
};
Response<AnalyzeTextResult> response = client.AnalyzeText(options);
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeTextAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> AnalyzeTextAsync (Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> AnalyzeTextAsync(class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeTextAsync(Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeTextAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member AnalyzeTextAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AnalyzeTextAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.AnalyzeTextAsync (content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Analyze Text
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="content" /> is null. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call AnalyzeTextAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
text = "<text>",
});
Response response = await client.AnalyzeTextAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
]]></code>
This sample shows how to call AnalyzeTextAsync with all request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
text = "<text>",
categories = new object[]
{
"Hate"
},
blocklistNames = new object[]
{
"<blocklistNames>"
},
haltOnBlocklistHit = true,
outputType = "FourSeverityLevels",
});
Response response = await client.AnalyzeTextAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemId").ToString());
Console.WriteLine(result.GetProperty("blocklistsMatch")[0].GetProperty("blocklistItemText").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString());
Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("severity").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="AnalyzeTextAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync (string text, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync(string text, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeTextAsync(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeTextAsync (text As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeTextResult))" />
<MemberSignature Language="F#" Value="abstract member AnalyzeTextAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>
override this.AnalyzeTextAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>" Usage="contentSafetyClient.AnalyzeTextAsync (text, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="text">To be added.</param>
<param name="cancellationToken">To be added.</param>
<summary> Analyze Text Async. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AnalyzeTextAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync (Azure.AI.ContentSafety.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync(class Azure.AI.ContentSafety.AnalyzeTextOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeTextAsync (options As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeTextResult))" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="F#" Value="abstract member AnalyzeTextAsync : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>
override this.AnalyzeTextAsync : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>" Usage="contentSafetyClient.AnalyzeTextAsync (options, cancellationToken)" FrameworkAlternate="azure-dotnet" />
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync (Azure.AI.ContentSafety.AnalyzeTextOptions body, System.Threading.CancellationToken cancellationToken = default);" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.AnalyzeTextResult>> AnalyzeTextAsync(class Azure.AI.ContentSafety.AnalyzeTextOptions body, valuetype System.Threading.CancellationToken cancellationToken) cil managed" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeTextAsync (body As AnalyzeTextOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AnalyzeTextResult))" FrameworkAlternate="azure-dotnet-preview" />
<MemberSignature Language="F#" Value="abstract member AnalyzeTextAsync : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>
override this.AnalyzeTextAsync : Azure.AI.ContentSafety.AnalyzeTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>>" Usage="contentSafetyClient.AnalyzeTextAsync (body, cancellationToken)" FrameworkAlternate="azure-dotnet-preview" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.AnalyzeTextResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="Azure.AI.ContentSafety.AnalyzeTextOptions" Index="0" FrameworkAlternate="azure-dotnet" />
<Parameter Name="body" Type="Azure.AI.ContentSafety.AnalyzeTextOptions" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" />
</Parameters>
<Docs>
<param name="options"> The text analysis request. </param>
<param name="body"> The request of text analysis. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Analyze Text. </summary>
<returns>To be added.</returns>
<remarks> A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="options" /> is null. </exception>
<example>
This sample shows how to call AnalyzeTextAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeTextOptions options = new AnalyzeTextOptions("<text>");
Response<AnalyzeTextResult> response = await client.AnalyzeTextAsync(options);
]]></code>
This sample shows how to call AnalyzeTextAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ContentSafetyClient client = new ContentSafetyClient(endpoint, credential);
AnalyzeTextOptions options = new AnalyzeTextOptions("<text>")
{
Categories = { TextCategory.Hate },
BlocklistNames = { "<blocklistNames>" },
HaltOnBlocklistHit = true,
OutputType = AnalyzeTextOutputType.FourSeverityLevels,
};
Response<AnalyzeTextResult> response = await client.AnalyzeTextAsync(options);
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrUpdateTextBlocklist">
<MemberSignature Language="C#" Value="public virtual Azure.Response CreateOrUpdateTextBlocklist (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response CreateOrUpdateTextBlocklist(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.CreateOrUpdateTextBlocklist(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrUpdateTextBlocklist (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member CreateOrUpdateTextBlocklist : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.CreateOrUpdateTextBlocklist : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.CreateOrUpdateTextBlocklist (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create Or Update Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrUpdateTextBlocklist with required parameters and request content, and how to parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blocklistName = "<blocklistName>",
};
Response response = client.CreateOrUpdateTextBlocklist("<blocklistName>", RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
]]></code>
This sample shows how to call CreateOrUpdateTextBlocklist with all parameters and request content, and how to parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blocklistName = "<blocklistName>",
description = "<description>",
};
Response response = client.CreateOrUpdateTextBlocklist("<blocklistName>", RequestContent.Create(data), new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrUpdateTextBlocklistAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrUpdateTextBlocklistAsync (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> CreateOrUpdateTextBlocklistAsync(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.CreateOrUpdateTextBlocklistAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrUpdateTextBlocklistAsync (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member CreateOrUpdateTextBlocklistAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateOrUpdateTextBlocklistAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.CreateOrUpdateTextBlocklistAsync (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create Or Update Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrUpdateTextBlocklistAsync with required parameters and request content, and how to parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blocklistName = "<blocklistName>",
};
Response response = await client.CreateOrUpdateTextBlocklistAsync("<blocklistName>", RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
]]></code>
This sample shows how to call CreateOrUpdateTextBlocklistAsync with all parameters and request content, and how to parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blocklistName = "<blocklistName>",
description = "<description>",
};
Response response = await client.CreateOrUpdateTextBlocklistAsync("<blocklistName>", RequestContent.Create(data), new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="DeleteTextBlocklist">
<MemberSignature Language="C#" Value="public virtual Azure.Response DeleteTextBlocklist (string blocklistName, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response DeleteTextBlocklist(string blocklistName, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.DeleteTextBlocklist(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function DeleteTextBlocklist (blocklistName As String, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member DeleteTextBlocklist : string * Azure.RequestContext -> Azure.Response
override this.DeleteTextBlocklist : string * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.DeleteTextBlocklist (blocklistName, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Delete Text Blocklist By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call DeleteTextBlocklist with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = client.DeleteTextBlocklist("<blocklistName>", new RequestContext());
Console.WriteLine(response.Status);
]]></code></example>
</Docs>
</Member>
<Member MemberName="DeleteTextBlocklistAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> DeleteTextBlocklistAsync (string blocklistName, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> DeleteTextBlocklistAsync(string blocklistName, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.DeleteTextBlocklistAsync(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function DeleteTextBlocklistAsync (blocklistName As String, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member DeleteTextBlocklistAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteTextBlocklistAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.DeleteTextBlocklistAsync (blocklistName, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Delete Text Blocklist By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call DeleteTextBlocklistAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = await client.DeleteTextBlocklistAsync("<blocklistName>", new RequestContext());
Console.WriteLine(response.Status);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklist">
<MemberSignature Language="C#" Value="public virtual Azure.Response GetTextBlocklist (string blocklistName, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response GetTextBlocklist(string blocklistName, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklist(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklist (blocklistName As String, context As RequestContext) As Response" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklist : string * Azure.RequestContext -> Azure.Response
override this.GetTextBlocklist : string * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.GetTextBlocklist (blocklistName, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get Text Blocklist By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklist(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklist with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = client.GetTextBlocklist("<blocklistName>", new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklist">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklist (string blocklistName, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklist(string blocklistName, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklist(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklist (blocklistName As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of TextBlocklist)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklist : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.TextBlocklist>
override this.GetTextBlocklist : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.TextBlocklist>" Usage="contentSafetyClient.GetTextBlocklist (blocklistName, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.TextBlocklist></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get Text Blocklist By blocklistName. </summary>
<returns>To be added.</returns>
<remarks> Returns text blocklist details. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklist with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var result = client.GetTextBlocklist("<blocklistName>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> GetTextBlocklistAsync (string blocklistName, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> GetTextBlocklistAsync(string blocklistName, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistAsync(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistAsync (blocklistName As String, context As RequestContext) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTextBlocklistAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.GetTextBlocklistAsync (blocklistName, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get Text Blocklist By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistAsync(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistAsync with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = await client.GetTextBlocklistAsync("<blocklistName>", new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlocklist>> GetTextBlocklistAsync (string blocklistName, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.TextBlocklist>> GetTextBlocklistAsync(string blocklistName, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistAsync(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistAsync (blocklistName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TextBlocklist))" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlocklist>>
override this.GetTextBlocklistAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlocklist>>" Usage="contentSafetyClient.GetTextBlocklistAsync (blocklistName, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlocklist>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get Text Blocklist By blocklistName. </summary>
<returns>To be added.</returns>
<remarks> Returns text blocklist details. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklistAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var result = await client.GetTextBlocklistAsync("<blocklistName>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItem">
<MemberSignature Language="C#" Value="public virtual Azure.Response GetTextBlocklistItem (string blocklistName, string blockItemId, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response GetTextBlocklistItem(string blocklistName, string blockItemId, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItem(System.String,System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItem (blocklistName As String, blockItemId As String, context As RequestContext) As Response" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItem : string * string * Azure.RequestContext -> Azure.Response
override this.GetTextBlocklistItem : string * string * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.GetTextBlocklistItem (blocklistName, blockItemId, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="blockItemId" Type="System.String" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="blockItemId"> Block Item Id. It will be uuid. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get BlockItem By blocklistName And blockItemId
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItem(System.String,System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistItem with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = client.GetTextBlocklistItem("<blocklistName>", "<blockItemId>", new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("text").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItem">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItem (string blocklistName, string blockItemId, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItem(string blocklistName, string blockItemId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItem(System.String,System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItem (blocklistName As String, blockItemId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of TextBlockItem)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItem : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.TextBlockItem>
override this.GetTextBlocklistItem : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.ContentSafety.TextBlockItem>" Usage="contentSafetyClient.GetTextBlocklistItem (blocklistName, blockItemId, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.AI.ContentSafety.TextBlockItem></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="blockItemId" Type="System.String" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="blockItemId"> Block Item Id. It will be uuid. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get BlockItem By blocklistName And blockItemId. </summary>
<returns>To be added.</returns>
<remarks> Get blockItem By blockItemId from a text blocklist. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklistItem with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var result = client.GetTextBlocklistItem("<blocklistName>", "<blockItemId>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItemAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> GetTextBlocklistItemAsync (string blocklistName, string blockItemId, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> GetTextBlocklistItemAsync(string blocklistName, string blockItemId, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemAsync(System.String,System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItemAsync (blocklistName As String, blockItemId As String, context As RequestContext) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItemAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTextBlocklistItemAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.GetTextBlocklistItemAsync (blocklistName, blockItemId, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="blockItemId" Type="System.String" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="blockItemId"> Block Item Id. It will be uuid. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get BlockItem By blocklistName And blockItemId
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemAsync(System.String,System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistItemAsync with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
Response response = await client.GetTextBlocklistItemAsync("<blocklistName>", "<blockItemId>", new RequestContext());
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("text").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItemAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlockItem>> GetTextBlocklistItemAsync (string blocklistName, string blockItemId, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.AI.ContentSafety.TextBlockItem>> GetTextBlocklistItemAsync(string blocklistName, string blockItemId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemAsync(System.String,System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItemAsync (blocklistName As String, blockItemId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TextBlockItem))" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItemAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlockItem>>
override this.GetTextBlocklistItemAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlockItem>>" Usage="contentSafetyClient.GetTextBlocklistItemAsync (blocklistName, blockItemId, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.AI.ContentSafety.TextBlockItem>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="blockItemId" Type="System.String" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="blockItemId"> Block Item Id. It will be uuid. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get BlockItem By blocklistName And blockItemId. </summary>
<returns>To be added.</returns>
<remarks> Get blockItem By blockItemId from a text blocklist. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> or <paramref name="blockItemId" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklistItemAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var result = await client.GetTextBlocklistItemAsync("<blocklistName>", "<blockItemId>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItems">
<MemberSignature Language="C#" Value="public virtual Azure.Pageable<BinaryData> GetTextBlocklistItems (string blocklistName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1<class System.BinaryData> GetTextBlocklistItems(string blocklistName, valuetype System.Nullable`1<int32> maxCount, valuetype System.Nullable`1<int32> skip, valuetype System.Nullable`1<int32> maxpagesize, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItems(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItems (blocklistName As String, maxCount As Nullable(Of Integer), skip As Nullable(Of Integer), maxpagesize As Nullable(Of Integer), context As RequestContext) As Pageable(Of BinaryData)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItems : string * Nullable<int> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetTextBlocklistItems : string * Nullable<int> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>" Usage="contentSafetyClient.GetTextBlocklistItems (blocklistName, maxCount, skip, maxpagesize, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Pageable<System.BinaryData></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxCount" Type="System.Nullable<System.Int32>" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="skip" Type="System.Nullable<System.Int32>" Index="2" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxpagesize" Type="System.Nullable<System.Int32>" Index="3" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="4" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="maxCount"> The number of result items to return. </param>
<param name="skip"> The number of result items to skip. </param>
<param name="maxpagesize"> The maximum number of result items per page. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get All BlockItems By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItems(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The <see cref="T:Azure.Pageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistItems with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
foreach (var item in client.GetTextBlocklistItems("<blocklistName>", 1234, 1234, 1234, new RequestContext()))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("text").ToString());
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItems">
<MemberSignature Language="C#" Value="public virtual Azure.Pageable<Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItems (string blocklistName, int? maxCount = default, int? skip = default, int? maxpagesize = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1<class Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItems(string blocklistName, valuetype System.Nullable`1<int32> maxCount, valuetype System.Nullable`1<int32> skip, valuetype System.Nullable`1<int32> maxpagesize, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItems(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItems (blocklistName As String, Optional maxCount As Nullable(Of Integer) = Nothing, Optional skip As Nullable(Of Integer) = Nothing, Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TextBlockItem)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItems : string * Nullable<int> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.ContentSafety.TextBlockItem>
override this.GetTextBlocklistItems : string * Nullable<int> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.ContentSafety.TextBlockItem>" Usage="contentSafetyClient.GetTextBlocklistItems (blocklistName, maxCount, skip, maxpagesize, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Pageable<Azure.AI.ContentSafety.TextBlockItem></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxCount" Type="System.Nullable<System.Int32>" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="skip" Type="System.Nullable<System.Int32>" Index="2" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxpagesize" Type="System.Nullable<System.Int32>" Index="3" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="4" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="maxCount"> The number of result items to return. </param>
<param name="skip"> The number of result items to skip. </param>
<param name="maxpagesize"> The maximum number of result items per page. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get All BlockItems By blocklistName. </summary>
<returns>To be added.</returns>
<remarks> Get all blockItems in a text blocklist. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklistItems with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
foreach (var item in client.GetTextBlocklistItems("<blocklistName>", 1234, 1234, 1234))
{
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItemsAsync">
<MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable<BinaryData> GetTextBlocklistItemsAsync (string blocklistName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<class System.BinaryData> GetTextBlocklistItemsAsync(string blocklistName, valuetype System.Nullable`1<int32> maxCount, valuetype System.Nullable`1<int32> skip, valuetype System.Nullable`1<int32> maxpagesize, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemsAsync(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItemsAsync (blocklistName As String, maxCount As Nullable(Of Integer), skip As Nullable(Of Integer), maxpagesize As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItemsAsync : string * Nullable<int> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetTextBlocklistItemsAsync : string * Nullable<int> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>" Usage="contentSafetyClient.GetTextBlocklistItemsAsync (blocklistName, maxCount, skip, maxpagesize, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<System.BinaryData></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxCount" Type="System.Nullable<System.Int32>" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="skip" Type="System.Nullable<System.Int32>" Index="2" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxpagesize" Type="System.Nullable<System.Int32>" Index="3" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="4" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="maxCount"> The number of result items to return. </param>
<param name="skip"> The number of result items to skip. </param>
<param name="maxpagesize"> The maximum number of result items per page. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get All BlockItems By blocklistName
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemsAsync(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The <see cref="T:Azure.AsyncPageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistItemsAsync with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
await foreach (var item in client.GetTextBlocklistItemsAsync("<blocklistName>", 1234, 1234, 1234, new RequestContext()))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("blockItemId").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("text").ToString());
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistItemsAsync">
<MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItemsAsync (string blocklistName, int? maxCount = default, int? skip = default, int? maxpagesize = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<class Azure.AI.ContentSafety.TextBlockItem> GetTextBlocklistItemsAsync(string blocklistName, valuetype System.Nullable`1<int32> maxCount, valuetype System.Nullable`1<int32> skip, valuetype System.Nullable`1<int32> maxpagesize, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistItemsAsync(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistItemsAsync (blocklistName As String, Optional maxCount As Nullable(Of Integer) = Nothing, Optional skip As Nullable(Of Integer) = Nothing, Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of TextBlockItem)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistItemsAsync : string * Nullable<int> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlockItem>
override this.GetTextBlocklistItemsAsync : string * Nullable<int> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlockItem>" Usage="contentSafetyClient.GetTextBlocklistItemsAsync (blocklistName, maxCount, skip, maxpagesize, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlockItem></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxCount" Type="System.Nullable<System.Int32>" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="skip" Type="System.Nullable<System.Int32>" Index="2" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="maxpagesize" Type="System.Nullable<System.Int32>" Index="3" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="4" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="maxCount"> The number of result items to return. </param>
<param name="skip"> The number of result items to skip. </param>
<param name="maxpagesize"> The maximum number of result items per page. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get All BlockItems By blocklistName. </summary>
<returns>To be added.</returns>
<remarks> Get all blockItems in a text blocklist. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call GetTextBlocklistItemsAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
await foreach (var item in client.GetTextBlocklistItemsAsync("<blocklistName>", 1234, 1234, 1234))
{
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklists">
<MemberSignature Language="C#" Value="public virtual Azure.Pageable<BinaryData> GetTextBlocklists (Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1<class System.BinaryData> GetTextBlocklists(class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklists(Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklists (context As RequestContext) As Pageable(Of BinaryData)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklists : Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetTextBlocklists : Azure.RequestContext -> Azure.Pageable<BinaryData>" Usage="contentSafetyClient.GetTextBlocklists context" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Pageable<System.BinaryData></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="context" Type="Azure.RequestContext" Index="0" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get All Text Blocklists
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklists(System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The <see cref="T:Azure.Pageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
<remarks>To be added.</remarks>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklists with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
foreach (var item in client.GetTextBlocklists(new RequestContext()))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklists">
<MemberSignature Language="C#" Value="public virtual Azure.Pageable<Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklists (System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1<class Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklists(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklists(System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklists (Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TextBlocklist)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklists : System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.ContentSafety.TextBlocklist>
override this.GetTextBlocklists : System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.ContentSafety.TextBlocklist>" Usage="contentSafetyClient.GetTextBlocklists cancellationToken" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Pageable<Azure.AI.ContentSafety.TextBlocklist></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get All Text Blocklists. </summary>
<returns>To be added.</returns>
<remarks> Get all text blocklists details. </remarks>
<example>
This sample shows how to call GetTextBlocklists.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
foreach (var item in client.GetTextBlocklists())
{
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistsAsync">
<MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable<BinaryData> GetTextBlocklistsAsync (Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<class System.BinaryData> GetTextBlocklistsAsync(class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistsAsync(Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistsAsync (context As RequestContext) As AsyncPageable(Of BinaryData)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistsAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetTextBlocklistsAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>" Usage="contentSafetyClient.GetTextBlocklistsAsync context" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<System.BinaryData></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="context" Type="Azure.RequestContext" Index="0" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Get All Text Blocklists
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistsAsync(System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The <see cref="T:Azure.AsyncPageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
<remarks>To be added.</remarks>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call GetTextBlocklistsAsync with required parameters and parse the result.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext()))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("blocklistName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTextBlocklistsAsync">
<MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklistsAsync (System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<class Azure.AI.ContentSafety.TextBlocklist> GetTextBlocklistsAsync(valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.GetTextBlocklistsAsync(System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetTextBlocklistsAsync (Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of TextBlocklist)" />
<MemberSignature Language="F#" Value="abstract member GetTextBlocklistsAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlocklist>
override this.GetTextBlocklistsAsync : System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlocklist>" Usage="contentSafetyClient.GetTextBlocklistsAsync cancellationToken" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<Azure.AI.ContentSafety.TextBlocklist></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Get All Text Blocklists. </summary>
<returns>To be added.</returns>
<remarks> Get all text blocklists details. </remarks>
<example>
This sample shows how to call GetTextBlocklistsAsync.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
await foreach (var item in client.GetTextBlocklistsAsync())
{
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="Pipeline">
<MemberSignature Language="C#" Value="public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Azure.Core.Pipeline.HttpPipeline Pipeline" />
<MemberSignature Language="DocId" Value="P:Azure.AI.ContentSafety.ContentSafetyClient.Pipeline" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Pipeline As HttpPipeline" />
<MemberSignature Language="F#" Value="member this.Pipeline : Azure.Core.Pipeline.HttpPipeline" Usage="Azure.AI.ContentSafety.ContentSafetyClient.Pipeline" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Core.Pipeline.HttpPipeline</ReturnType>
</ReturnValue>
<Docs>
<summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemoveBlockItems">
<MemberSignature Language="C#" Value="public virtual Azure.Response RemoveBlockItems (string blocklistName, Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response RemoveBlockItems(string blocklistName, class Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItems(System.String,Azure.AI.ContentSafety.RemoveBlockItemsOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveBlockItems (blocklistName As String, removeBlockItemsOptions As RemoveBlockItemsOptions, Optional cancellationToken As CancellationToken = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member RemoveBlockItems : string * Azure.AI.ContentSafety.RemoveBlockItemsOptions * System.Threading.CancellationToken -> Azure.Response
override this.RemoveBlockItems : string * Azure.AI.ContentSafety.RemoveBlockItemsOptions * System.Threading.CancellationToken -> Azure.Response" Usage="contentSafetyClient.RemoveBlockItems (blocklistName, removeBlockItemsOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="removeBlockItemsOptions" Type="Azure.AI.ContentSafety.RemoveBlockItemsOptions" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="removeBlockItemsOptions"> The request of removing blockItems from text blocklist. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Remove BlockItems From Text Blocklist. </summary>
<returns>To be added.</returns>
<remarks> Remove blockItems from a text blocklist. You can remove at most 100 BlockItems in one request. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="removeBlockItemsOptions" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call RemoveBlockItems with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[]
{
"<null>"
});
var result = client.RemoveBlockItems("<blocklistName>", removeBlockItemsOptions);
]]></code></example>
</Docs>
</Member>
<Member MemberName="RemoveBlockItems">
<MemberSignature Language="C#" Value="public virtual Azure.Response RemoveBlockItems (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response RemoveBlockItems(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItems(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveBlockItems (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member RemoveBlockItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.RemoveBlockItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="contentSafetyClient.RemoveBlockItems (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Remove BlockItems From Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItems(System.String,Azure.AI.ContentSafety.RemoveBlockItemsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call RemoveBlockItems with required parameters and request content.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blockItemIds = new[] {
"<String>"
},
};
Response response = client.RemoveBlockItems("<blocklistName>", RequestContent.Create(data), new RequestContext());
Console.WriteLine(response.Status);
]]></code></example>
</Docs>
</Member>
<Member MemberName="RemoveBlockItemsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> RemoveBlockItemsAsync (string blocklistName, Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> RemoveBlockItemsAsync(string blocklistName, class Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItemsAsync(System.String,Azure.AI.ContentSafety.RemoveBlockItemsOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveBlockItemsAsync (blocklistName As String, removeBlockItemsOptions As RemoveBlockItemsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member RemoveBlockItemsAsync : string * Azure.AI.ContentSafety.RemoveBlockItemsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.RemoveBlockItemsAsync : string * Azure.AI.ContentSafety.RemoveBlockItemsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.RemoveBlockItemsAsync (blocklistName, removeBlockItemsOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="removeBlockItemsOptions" Type="Azure.AI.ContentSafety.RemoveBlockItemsOptions" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="removeBlockItemsOptions"> The request of removing blockItems from text blocklist. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Remove BlockItems From Text Blocklist. </summary>
<returns>To be added.</returns>
<remarks> Remove blockItems from a text blocklist. You can remove at most 100 BlockItems in one request. </remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="removeBlockItemsOptions" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call RemoveBlockItemsAsync with required parameters.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[]
{
"<null>"
});
var result = await client.RemoveBlockItemsAsync("<blocklistName>", removeBlockItemsOptions);
]]></code></example>
</Docs>
</Member>
<Member MemberName="RemoveBlockItemsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> RemoveBlockItemsAsync (string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> RemoveBlockItemsAsync(string blocklistName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItemsAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveBlockItemsAsync (blocklistName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member RemoveBlockItemsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.RemoveBlockItemsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="contentSafetyClient.RemoveBlockItemsAsync (blocklistName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.AI.ContentSafety</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="blocklistName" Type="System.String" Index="0" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="content" Type="Azure.Core.RequestContent" Index="1" FrameworkAlternate="azure-dotnet-preview" />
<Parameter Name="context" Type="Azure.RequestContext" Index="2" FrameworkAlternate="azure-dotnet-preview" />
</Parameters>
<Docs>
<param name="blocklistName"> Text blocklist name. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Remove BlockItems From Text Blocklist
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.AI.ContentSafety.ContentSafetyClient.RemoveBlockItemsAsync(System.String,Azure.AI.ContentSafety.RemoveBlockItemsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="blocklistName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="blocklistName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call RemoveBlockItemsAsync with required parameters and request content.
<code><![CDATA[
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ContentSafetyClient(endpoint, credential);
var data = new {
blockItemIds = new[] {
"<String>"
},
};
Response response = await client.RemoveBlockItemsAsync("<blocklistName>", RequestContent.Create(data), new RequestContext());
Console.WriteLine(response.Status);
]]></code></example>
</Docs>
</Member>
</Members>
</Type>