Compartir a través de


IVsProjectSecrets.RemoveSecretAsync(String, CancellationToken) Method

Definition

Deletes a previously stored secret.

public System.Threading.Tasks.Task<bool> RemoveSecretAsync (string name, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveSecretAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function RemoveSecretAsync (name As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

name
String

The name of the secret to remove. Must not be null or empty.

cancellationToken
CancellationToken

A token that may cancel this operation.

Returns

A task that returns a boolean value indicating whether the secret was removed. true if the secret was successfully removed. false if no secret with the specified name was found to remove.

Exceptions

Thrown if name is null.

Thrown if name is empty.

Thrown when integrity rules would be violated by this operation.

Thrown when the user does not have permission for this operation.

Thrown when the operation could not be completed due to some network or I/O failure.

Applies to