private MissingFilesRequest GetMissingFilesRequest()
        {
            var files          = Directory.EnumerateFiles(examinationAudioSynchronizationConfiguration.AudioFilesWorkingDirectory);
            var resultFileName = files.Select(audio => Path.GetFileNameWithoutExtension(audio));
            var repeatedFiles  = new RepeatedField <string>();

            repeatedFiles.AddRange(resultFileName);

            return(new MissingFilesRequest
            {
                FileNames = { repeatedFiles },
                Endpoint = $"{NetworkAddressUtils.GetDefaultIPv4Address()}:{hostedServices.ExaminationActionsConfiguration.Port}"
            });
        }
        private async Task SubscribeToCentralGazoo(ApplicationType applicationType)
        {
            if (!isSubscribedToCentralGazoo)
            {
                try
                {
                    var request = new SubscriptionRequest
                    {
                        Endpoint     = $"{NetworkAddressUtils.GetDefaultIPv4Address()}:{hostedService.Port}",
                        InstanceName = instanceConfiguration.Name,
                        Target       = (int)applicationType
                    };

                    logger.LogInformation("Sending request to Central Gazoo for subscribing.");
                    await Request(async x => await x.SubscribeAsync(request));

                    isSubscribedToCentralGazoo = true;
                }
                catch (Exception ex)
                {
                    logger.LogError(ex, $"Error was occured while trying subscribe local Gazoo.");
                }
            }
        }