Пример #1
0
        // Token: 0x06000361 RID: 865 RVA: 0x00012710 File Offset: 0x00010910
        public static void ReadConfigurationPaged <T>(ADConfigurationReader <ADPagedReader <T> > configurationReader, ADConfigurationProcessor <T> configurationProcessor, int retryCount) where T : IConfigurable, new()
        {
            if (configurationProcessor == null)
            {
                throw new ArgumentNullException("configurationProcessor");
            }
            ADPagedReader <T> pagedReader = ADNotificationAdapter.ReadConfiguration <ADPagedReader <T> >(configurationReader, retryCount);
            IEnumerator <T>   enumerator  = null;

            ADNotificationAdapter.RunADOperation(delegate()
            {
                enumerator = pagedReader.GetEnumerator();
            }, retryCount);
            Breadcrumbs <Exception> exceptions = new Breadcrumbs <Exception>(32);

            try
            {
                for (;;)
                {
                    bool hasMore = false;
                    ADNotificationAdapter.RunADOperation(delegate()
                    {
                        try
                        {
                            hasMore = enumerator.MoveNext();
                        }
                        catch (Exception bc)
                        {
                            exceptions.Drop(bc);
                            enumerator.Dispose();
                            enumerator = pagedReader.GetEnumerator();
                            throw;
                        }
                    }, retryCount);
                    if (!hasMore)
                    {
                        break;
                    }
                    configurationProcessor(enumerator.Current);
                }
            }
            finally
            {
                enumerator.Dispose();
            }
        }
Пример #2
0
 // Token: 0x0600035B RID: 859 RVA: 0x000124D2 File Offset: 0x000106D2
 public static T ReadConfiguration <T>(ADConfigurationReader <T> configurationReader)
 {
     return(ADNotificationAdapter.ReadConfiguration <T>(configurationReader, 10));
 }