public async Task RunActivity(
            [ActivityTrigger] IDurableActivityContext functionContext,
            ILogger log)
        {
            if (functionContext is null)
            {
                throw new ArgumentNullException(nameof(functionContext));
            }

            var project = functionContext.GetInput <ProjectDocument>();

            try
            {
                var providers = await Task.WhenAll(project.Type.Providers
                                                   .Select(p => providersRepository.GetAsync(p.Id)))
                                .ConfigureAwait(false);

                var resourceProviderNamespaces = providers
                                                 .Where(p => p.ResourceProviders?.Any() ?? false)
                                                 .SelectMany(p => p.ResourceProviders)
                                                 .Distinct();

                if (resourceProviderNamespaces.Any())
                {
                    await azureResourceService
                    .RegisterProvidersAsync(project.ResourceGroup.SubscriptionId, resourceProviderNamespaces)
                    .ConfigureAwait(false);
                }
            }
            catch (Exception exc)
            {
                log.LogError(exc, $"Activity '{nameof(ResourceProviderRegisterActivity)} failed: {exc.Message}");

                throw exc.AsSerializable();
            }
        }