Example #1
0
        private List <DiscoveryPluginResultBase> Linearize(
            IEnumerable <DiscoveryPluginResultBase> input)
        {
            List <DiscoveryPluginResultBase>        pluginResultBaseList1 = (List <DiscoveryPluginResultBase>)Linearizer.Linearize <DiscoveryPluginResultBase>((IEnumerable <Linearizer.Input <M0> >)input.Select <DiscoveryPluginResultBase, Linearizer.Input <DiscoveryPluginResultBase> >((Func <DiscoveryPluginResultBase, Linearizer.Input <DiscoveryPluginResultBase> >)(item => (Linearizer.Input <DiscoveryPluginResultBase>)Linearizer.CreateInputItem <DiscoveryPluginResultBase>((M0)item, (IEnumerable <M0>)item.GetPrerequisites(input)))).ToArray <Linearizer.Input <DiscoveryPluginResultBase> >(), true, true);
            IEnumerable <DiscoveryPluginResultBase> collection            = ((IEnumerable <DiscoveryPluginResultBase>)pluginResultBaseList1).Where <DiscoveryPluginResultBase>((Func <DiscoveryPluginResultBase, bool>)(item => item is CoreDiscoveryPluginResult && item.get_PluginTypeName() == "SolarWinds.Orion.Core.DiscoveryPlugin.CoreDiscoveryPlugin"));
            List <DiscoveryPluginResultBase>        pluginResultBaseList2 = new List <DiscoveryPluginResultBase>();

            pluginResultBaseList2.AddRange(collection);
            for (int index = 0; index < pluginResultBaseList1.Count; ++index)
            {
                DiscoveryPluginResultBase pluginResultBase = pluginResultBaseList1[index];
                if (!(pluginResultBase is CoreDiscoveryPluginResult) || !(pluginResultBase.get_PluginTypeName() == "SolarWinds.Orion.Core.DiscoveryPlugin.CoreDiscoveryPlugin"))
                {
                    pluginResultBaseList2.Add(pluginResultBase);
                }
            }
            return(pluginResultBaseList2);
        }
        // Token: 0x06000625 RID: 1573 RVA: 0x000251D8 File Offset: 0x000233D8
        private List <DiscoveryPluginResultBase> Linearize(IEnumerable <DiscoveryPluginResultBase> input)
        {
            List <DiscoveryPluginResultBase> list = Linearizer.Linearize <DiscoveryPluginResultBase>((from item in input
                                                                                                      select Linearizer.CreateInputItem <DiscoveryPluginResultBase>(item, item.GetPrerequisites(input))).ToArray <Linearizer.Input <DiscoveryPluginResultBase> >(), true, true);
            IEnumerable <DiscoveryPluginResultBase> collection = from item in list
                                                                 where item is CoreDiscoveryPluginResult && item.PluginTypeName == "SolarWinds.Orion.Core.DiscoveryPlugin.CoreDiscoveryPlugin"
                                                                 select item;
            List <DiscoveryPluginResultBase> list2 = new List <DiscoveryPluginResultBase>();

            list2.AddRange(collection);
            for (int i = 0; i < list.Count; i++)
            {
                DiscoveryPluginResultBase discoveryPluginResultBase = list[i];
                if (!(discoveryPluginResultBase is CoreDiscoveryPluginResult) || !(discoveryPluginResultBase.PluginTypeName == "SolarWinds.Orion.Core.DiscoveryPlugin.CoreDiscoveryPlugin"))
                {
                    list2.Add(discoveryPluginResultBase);
                }
            }
            return(list2);
        }