Exemple #1
0
        public String Locate(ModDefinition definition, Boolean allowZipMods)
        {
            // This method isn't quite as performance-friendly as it could be, but
            // given how often it's called I think it's never going to really be the
            // bottleneck.

            Debug.Assert(definition != null, "definition != null");

            foreach (Tuple<String, ModDefinition> child in this.SearchPathChildren)
            {
                if (definition.IsSatisfiedBy(child.Item2))
                {
                    if (allowZipMods && child.Item1.EndsWith(".zip", true, CultureInfo.CurrentCulture))
                        return child.Item1;
                }
            }

            return null;
        }