/// <summary>
        /// Creates and groups state information of all families in a mod manager.
        /// </summary>
        public static ModFamilyStateGrouping FromManager(ModManager manager)
        {
            var states = new List <ModFamilyStateInfo>(manager.Families.Count);

            foreach (var family in manager.Families)
            {
                states.Add(ModFamilyStateInfo.FromFamily(family));
            }
            return(new ModFamilyStateGrouping(states));
        }
Esempio n. 2
0
        /// <summary>
        /// Creates and groups state information of all families in a mod manager
        /// </summary>
        public static ModFamilyStateGrouping FromManager(ModManager manager, bool includeBase = false)
        {
            var states = new List <ModFamilyStateInfo>(manager.Families.Count + (includeBase ? 1 : 0));

            if (includeBase)
            {
                states.Add(ModFamilyStateInfo.Base);
            }
            foreach (var family in manager.Families)
            {
                states.Add(ModFamilyStateInfo.FromFamily(family));
            }
            return(new ModFamilyStateGrouping(states));
        }