Пример #1
0
        /// <summary>
        /// Gets the configs for the given platform & category in order of ascending levels (<see cref="ConfigHierarchyLevel.Base"/> being the first)
        /// </summary>
        public void GetConfigs(string platform, string category, ConfigHierarchyLevelRange range, IList <ConfigIni> configs)
        {
            var levels = ConfigHierarchyLevelExtensions.GetLevelsAscending();

            foreach (var level in levels)
            {
                if (range.Includes(level))
                {
                    ConfigIni config = GetConfig(platform, category, level);
                    if (config != null)
                    {
                        configs.Add(config);
                    }
                }
            }
        }
Пример #2
0
 /// <inheritdoc cref="EvaluatePropertyValues(string,string,string,string,ConfigHierarchyLevelRange,UE4Config.Evaluation.PropertyEvaluator,System.Collections.Generic.IList{string})"/>
 public void EvaluatePropertyValues(string platform, string category, string sectionName, string propertyKey, PropertyEvaluator evaluator, IList <string> values)
 {
     EvaluatePropertyValues(platform, category, sectionName, propertyKey, ConfigHierarchyLevelRange.All(),
                            evaluator, values);
 }
Пример #3
0
        /// <summary>
        /// Evaluates a properties values over this hierarchy of configs.
        /// </summary>
        public virtual void EvaluatePropertyValues(string platform, string category, string sectionName, string propertyKey, ConfigHierarchyLevelRange range,
                                                   PropertyEvaluator evaluator, IList <string> values)
        {
            List <ConfigIni> configs = new List <ConfigIni>();

            GetConfigs(platform, category, range, configs);
            evaluator = PropertyEvaluator.CustomOrDefault(evaluator);
            evaluator.EvaluatePropertyValues(configs, sectionName, propertyKey, values);
        }
Пример #4
0
 public void GetConfigs(string category, IList <ConfigIni> configs)
 {
     GetConfigs(category, ConfigHierarchyLevelRange.All(), configs);
 }
Пример #5
0
 /// <summary>
 /// Gets the default configs for the category in order of ascending levels (<see cref="ConfigHierarchyLevel.Base"/> being the first)
 /// </summary>
 public void GetConfigs(string category, ConfigHierarchyLevelRange range, IList <ConfigIni> configs)
 {
     GetConfigs(DefaultPlatform, category, range, configs);
 }
Пример #6
0
 /// <inheritdoc cref="EvaluatePropertyValues(string,string,string,string,UE4Config.Evaluation.PropertyEvaluator,System.Collections.Generic.IList{string})"/>
 /// <remarks>
 /// Uses "Default" platform
 /// Uses <see cref="PropertyEvaluator.Default"/> as evaluator
 /// </remarks>
 public void EvaluatePropertyValues(string category, string sectionName, string propertyKey, IList <string> values)
 {
     EvaluatePropertyValues(category, sectionName, propertyKey, ConfigHierarchyLevelRange.All(), values);
 }
Пример #7
0
 /// <inheritdoc cref="EvaluatePropertyValues(string,string,string,string,ConfigHierarchyLevelRange,UE4Config.Evaluation.PropertyEvaluator,System.Collections.Generic.IList{string})"/>
 /// <remarks>
 /// Uses "Default" platform
 /// Uses <see cref="PropertyEvaluator.Default"/> as evaluator
 /// </remarks>
 public void EvaluatePropertyValues(string category, string sectionName, string propertyKey, ConfigHierarchyLevelRange range, IList <string> values)
 {
     EvaluatePropertyValues(DefaultPlatform, category, sectionName, propertyKey, range, PropertyEvaluator.Default, values);
 }
Пример #8
0
 /// <summary>
 /// Returns a <see cref="ConfigHierarchyLevelRange"/> exactly representing this level.
 /// <see cref="ConfigHierarchyLevelRange.Exact"/>
 /// </summary>
 public static ConfigHierarchyLevelRange Exact(this ConfigHierarchyLevel level)
 {
     return(ConfigHierarchyLevelRange.Exact(level));
 }
Пример #9
0
 /// <summary>
 /// Returns a <see cref="ConfigHierarchyLevelRange"/> from this level to any higher
 /// <see cref="ConfigHierarchyLevelRange.AnyFrom"/>
 /// </summary>
 public static ConfigHierarchyLevelRange AndHigher(this ConfigHierarchyLevel level)
 {
     return(ConfigHierarchyLevelRange.AnyFrom(level));
 }
Пример #10
0
 /// <summary>
 /// Returns a <see cref="ConfigHierarchyLevelRange"/> from this level to any lower
 /// <see cref="ConfigHierarchyLevelRange.AnyTo"/>
 /// </summary>
 public static ConfigHierarchyLevelRange AndLower(this ConfigHierarchyLevel level)
 {
     return(ConfigHierarchyLevelRange.AnyTo(level));
 }
Пример #11
0
 /// <summary>
 /// Returns a <see cref="ConfigHierarchyLevelRange"/> from this level to a specific other level
 /// <see cref="ConfigHierarchyLevelRange.FromTo"/>
 /// </summary>
 public static ConfigHierarchyLevelRange To(this ConfigHierarchyLevel from, ConfigHierarchyLevel to)
 {
     return(ConfigHierarchyLevelRange.FromTo(from, to));
 }