Example #1
0
        public static bool TryGetIfEnabled <TMod>(this LoadOrder <IModListing <TMod> > loadOrder, ModKey modKey, [MaybeNullWhen(false)] out IModListing <TMod> item)
            where TMod : class, IModGetter
        {
            if (loadOrder.TryGetValue(modKey, out var listing) &&
                listing.Enabled)
            {
                item = listing;
                return(true);
            }

            item = default;
            return(false);
        }
Example #2
0
        public static void LoadOrderTryGetValue()
        {
            var lo = new LoadOrder <ISkyrimModGetter>();

            lo.TryGetValue(Utility.LightMasterModKey, out var item);
        }