Exemplo n.º 1
0
 /// <summary>
 /// Creates a new linking package relative to a load order.<br/>
 /// Will resolve links to the highest overriding mod containing the record being sought. <br/>
 /// Modification of the target LoadOrder, or Mods on the LoadOrder is not safe.  Internal caches can become
 /// incorrect if modifications occur on content already cached.
 /// </summary>
 /// <param name="loadOrder">LoadOrder to construct the package relative to</param>
 /// <returns>LinkPackage attached to given LoadOrder</returns>
 public static ImmutableLoadOrderLinkCache <TMod, TModGetter> ToImmutableLinkCache <TMod, TModGetter>(
     this LoadOrder <IModListing <TModGetter> > loadOrder)
     where TMod : class, IContextMod <TMod>, TModGetter
     where TModGetter : class, IContextGetterMod <TMod>
 {
     return(new ImmutableLoadOrderLinkCache <TMod, TModGetter>(
                loadOrder
                .Select(listing => listing.Value.Mod)
                .NotNull()));
 }
 public static MastersListOrderingByLoadOrder Factory <T>(LoadOrder <T> loadOrder)
     where T : IModKeyed
 {
     return(Factory(loadOrder.Select(listing => listing.Key)));
 }