次の方法で共有


CodeTransparencyClient.GetParameters Method

Definition

Overloads

GetParameters(RequestContext)

[Protocol Method] Get service parameters

GetParameters(CancellationToken)

Get service parameters.

GetParameters(RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get service parameters

public virtual Azure.Response GetParameters (Azure.RequestContext context);
abstract member GetParameters : Azure.RequestContext -> Azure.Response
override this.GetParameters : Azure.RequestContext -> Azure.Response
Public Overridable Function GetParameters (context As RequestContext) As Response

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetParameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = client.GetParameters(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("serviceCertificate").ToString());
Console.WriteLine(result.GetProperty("serviceId").ToString());
Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString());
Console.WriteLine(result.GetProperty("treeAlgorithm").ToString());

This sample shows how to call GetParameters with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = client.GetParameters(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("serviceCertificate").ToString());
Console.WriteLine(result.GetProperty("serviceId").ToString());
Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString());
Console.WriteLine(result.GetProperty("treeAlgorithm").ToString());

Applies to

GetParameters(CancellationToken)

Source:
CodeTransparencyClient.cs

Get service parameters.

public virtual Azure.Response<Azure.Security.CodeTransparency.ParametersResult> GetParameters (System.Threading.CancellationToken cancellationToken = default);
abstract member GetParameters : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.ParametersResult>
override this.GetParameters : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.ParametersResult>
Public Overridable Function GetParameters (Optional cancellationToken As CancellationToken = Nothing) As Response(Of ParametersResult)

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetParameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<ParametersResult> response = client.GetParameters();

This sample shows how to call GetParameters with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<ParametersResult> response = client.GetParameters();

Applies to