コード例 #1
0
        public async Task ProcessEventAsync(SfEvent sfEvent)
        {
            try
            {
                var sfClient = await _sfClientFactory.GetClientAsync();

                var fileUrl = sfClient.Items.GetEntityUriFromId(sfEvent.Event.Resource.Id);
                var file    = await sfClient.Items.Get(fileUrl).ExecuteAsync();

                var share = await GetShareAsync(sfClient, file);

                await Enqueue(file, share);

                _logger.LogInformation("File processed successfully");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Exception processing upload event");
            }
        }
コード例 #2
0
 public IActionResult Post([FromBody] SfEvent sfEvent)
 {
     _service.ProcessEventAsync(sfEvent);
     return(StatusCode(200));
 }