private async Task LoadAsync()

in src/Amazon.Extensions.Configuration.SystemsManager/SystemsManagerConfigurationProvider.cs [110:147]


        private async Task LoadAsync(bool reload)
        {
            try
            {
                var newData = await SystemsManagerProcessor.GetDataAsync().ConfigureAwait(false) ?? new Dictionary<string, string>();

                if (!Data.EquivalentTo(newData))
                {
                    Data = newData;

                    OnReload();
                }
            }
            catch (DuplicateParameterException) // Throw duplicate parameter exception irrespective of whether parameter is optional or not.
            {
                throw;
            }
            catch (Exception ex)
            {
                if (Source.Optional) return;

                var ignoreException = reload;
                if (Source.OnLoadException != null)
                {
                    var exceptionContext = new SystemsManagerExceptionContext
                    {
                        Provider = this,
                        Exception = ex,
                        Reload = reload
                    };
                    Source.OnLoadException(exceptionContext);
                    ignoreException = exceptionContext.Ignore;
                }

                if (!ignoreException)
                    throw;
            }
        }