Exemple #1
0
 public void Execute()
 {
     try
     {
         Open();
         var startSpb = new ServiceParameterBuffer3();
         startSpb.Append(IscCodes.isc_action_svc_get_fb_log);
         StartTask(startSpb);
         ProcessServiceOutput(ServiceParameterBufferBase.Empty);
     }
     catch (Exception ex)
     {
         throw FbException.Create(ex);
     }
     finally
     {
         Close();
     }
 }
Exemple #2
0
        public async Task ExecuteAsync(CancellationToken cancellationToken = default)
        {
            try
            {
                await OpenAsync(cancellationToken).ConfigureAwait(false);

                var startSpb = new ServiceParameterBuffer3();
                startSpb.Append(IscCodes.isc_action_svc_get_fb_log);
                await StartTaskAsync(startSpb, cancellationToken).ConfigureAwait(false);
                await ProcessServiceOutputAsync(ServiceParameterBufferBase.Empty, cancellationToken).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                throw FbException.Create(ex);
            }
            finally
            {
                await CloseAsync(cancellationToken).ConfigureAwait(false);
            }
        }