public Execution(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient) { _logger = logger; _biblosClient = biblosClient; _webApiClient = webApiClient; _biblosArchives = _biblosClient.Document.GetArchives(); _serializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, TypeNameHandling = TypeNameHandling.Objects, ReferenceLoopHandling = ReferenceLoopHandling.Ignore, PreserveReferencesHandling = PreserveReferencesHandling.All }; try { int?collaborationLocationId = _webApiClient.GetParameterCollaborationLocation().Result; if (collaborationLocationId.HasValue) { _collaborationLocation = _webApiClient.GetLocationAsync((short)collaborationLocationId.Value).Result; } if (_collaborationLocation == null) { throw new ArgumentException("Collaboration Location is empty", "CollaborationLocation"); } } catch (Exception ex) { _logger.WriteError(new LogMessage("error orrouring in get collaboration parameters"), ex, LogCategories); throw; } }