// Token: 0x060002BE RID: 702 RVA: 0x000111C4 File Offset: 0x0000F3C4 internal static void UpdateRoutine(int profileID) { if (profileID <= 0) { throw new ArgumentException("Invalid ProfileID", "profileID"); } using (LocaleThreadState.EnsurePrimaryLocale()) { try { IEnumerable <IScheduledDiscoveryPlugin> enumerable = DiscoveryHelper.GetOrderedDiscoveryPlugins().OfType <IScheduledDiscoveryPlugin>(); if (enumerable.Count <IScheduledDiscoveryPlugin>() > 0) { DiscoveryResultBase discoveryResult = DiscoveryResultManager.GetDiscoveryResult(profileID, enumerable.Cast <IDiscoveryPlugin>().ToList <IDiscoveryPlugin>()); using (IEnumerator <IScheduledDiscoveryPlugin> enumerator = enumerable.GetEnumerator()) { Action <string, double> < > 9__0; while (enumerator.MoveNext()) { IScheduledDiscoveryPlugin scheduledDiscoveryPlugin = enumerator.Current; DiscoveryResultBase discoveryResultBase = discoveryResult; Action <string, double> action; if ((action = < > 9__0) == null) { action = (< > 9__0 = delegate(string message, double phaseProgress) { if (DiscoveryNetObjectStatusManager.log.IsInfoEnabled) { DiscoveryNetObjectStatusManager.log.InfoFormat("Updating Discovered Net Object Statuses for profile {0}: {1} - {2}", profileID, phaseProgress, message); } }); } scheduledDiscoveryPlugin.UpdateImportStatuses(discoveryResultBase, action); } goto IL_CC; } } if (DiscoveryNetObjectStatusManager.log.IsInfoEnabled) { DiscoveryNetObjectStatusManager.log.InfoFormat("Skipping Discovered Net Object Status update for profile {0}", profileID); } IL_CC :; } catch (Exception ex) { DiscoveryNetObjectStatusManager.log.Error(string.Format("Update Discovered Net Object Statuses for profile {0} failed", profileID), ex); } } }
internal static void UpdateRoutine(int profileID) { if (profileID <= 0) { throw new ArgumentException("Invalid ProfileID", nameof(profileID)); } using (LocaleThreadState.EnsurePrimaryLocale()) { try { IEnumerable <IScheduledDiscoveryPlugin> source = ((IEnumerable)DiscoveryHelper.GetOrderedDiscoveryPlugins()).OfType <IScheduledDiscoveryPlugin>(); if (source.Count <IScheduledDiscoveryPlugin>() > 0) { DiscoveryResultBase discoveryResult = DiscoveryResultManager.GetDiscoveryResult(profileID, (IList <IDiscoveryPlugin>)((IEnumerable)source).Cast <IDiscoveryPlugin>().ToList <IDiscoveryPlugin>()); using (IEnumerator <IScheduledDiscoveryPlugin> enumerator = source.GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { enumerator.Current.UpdateImportStatuses(discoveryResult, (Action <string, double>)((message, phaseProgress) => { if (!DiscoveryNetObjectStatusManager.log.get_IsInfoEnabled()) { return; } DiscoveryNetObjectStatusManager.log.InfoFormat("Updating Discovered Net Object Statuses for profile {0}: {1} - {2}", (object)profileID, (object)phaseProgress, (object)message); })); } } } else { if (!DiscoveryNetObjectStatusManager.log.get_IsInfoEnabled()) { return; } DiscoveryNetObjectStatusManager.log.InfoFormat("Skipping Discovered Net Object Status update for profile {0}", (object)profileID); } } catch (Exception ex) { DiscoveryNetObjectStatusManager.log.Error((object)string.Format("Update Discovered Net Object Statuses for profile {0} failed", (object)profileID), ex); } } }