Exemplo n.º 1
0
        public async Task <KeyPairResponse> CreateKeyPair(KeyPairRequest request)
        {
            var keypair = await _compute.CreateKeyPairAsync(request);

            Register(keypair);
            return(keypair);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new key pair.
 /// </summary>
 /// <param name="request">The key pair request.</param>
 /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
 /// <returns>The response includes the generated private key.</returns>
 public virtual Task <KeyPairResponse> CreateKeyPairAsync(KeyPairRequest request, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_computeApi.CreateKeyPairAsync <KeyPairResponse>(request, cancellationToken));
 }
 public async Task<KeyPairResponse> CreateKeyPair(KeyPairRequest request)
 {
     var keypair = await _compute.CreateKeyPairAsync(request);
     Register(keypair);
     return keypair;
 }
 /// <inheritdoc cref="ComputeService.CreateKeyPairAsync" />
 public static KeyPairResponse CreateKeyPair(this ComputeService service, KeyPairRequest request)
 {
     return service.CreateKeyPairAsync(request).ForceSynchronous();
 }