Share via


CodeTransparencyClient.GetCodeTransparencyVersionAsync Method

Definition

Overloads

GetCodeTransparencyVersionAsync(RequestContext)

[Protocol Method] Get CodeTransparency version information.

GetCodeTransparencyVersionAsync(CancellationToken)

Get CodeTransparency version information.

GetCodeTransparencyVersionAsync(RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get CodeTransparency version information.

public virtual System.Threading.Tasks.Task<Azure.Response> GetCodeTransparencyVersionAsync (Azure.RequestContext context);
abstract member GetCodeTransparencyVersionAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetCodeTransparencyVersionAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetCodeTransparencyVersionAsync (context As RequestContext) As Task(Of 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 GetCodeTransparencyVersionAsync 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 = await client.GetCodeTransparencyVersionAsync(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("scitt_version").ToString());

This sample shows how to call GetCodeTransparencyVersionAsync 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 = await client.GetCodeTransparencyVersionAsync(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("scitt_version").ToString());

Applies to

GetCodeTransparencyVersionAsync(CancellationToken)

Source:
CodeTransparencyClient.cs

Get CodeTransparency version information.

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

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetCodeTransparencyVersionAsync.

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

Response<VersionResult> response = await client.GetCodeTransparencyVersionAsync();

This sample shows how to call GetCodeTransparencyVersionAsync with all parameters.

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

Response<VersionResult> response = await client.GetCodeTransparencyVersionAsync();

Applies to