/// <summary>
 /// Initiates registration sequence for specified device.
 /// </summary>
 /// <param name="request">The device information to register.</param>
 /// <returns>Registration response.</returns>
 public async Task <RegistrationResponse> Register(RegistrationRequest request)
 {
     using (Logger.StartActivity($"Registering scanner: {request.Name} ({request.Description})"))
     {
         return(await _client.Post <RegistrationResponse>("register", request));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Uploads the specified data to the TWAIN Cloud.
 /// </summary>
 /// <param name="data">The data to upload.</param>
 /// <returns>Unique ID of the object stored in the cloud.</returns>
 public async Task <string> UploadBlock(byte[] data)
 {
     return(await _client.Post <string>($"scanners/{_scannerId}/blocks", data));
 }
 /// <summary>
 /// Sends the command to the specified scanner.
 /// </summary>
 /// <param name="scannerId">The scanner identifier.</param>
 /// <param name="command">The command.</param>
 /// <returns></returns>
 public async Task SendCommand(string scannerId, string command)
 {
     await _client.Post <object>($"scanners/{scannerId}/privet/twaindirect/session", command);
 }