Exemple #1
0
 public IIntermediateModifier Resolve(IIntermediateModifier unresolved, ResolveContext context)
 {
     return(_builder
            .WithValues(unresolved.Entries.Select(e => e.Value?.Resolve(context)))
            .WithForms(unresolved.Entries.Select(e => e.Form?.Resolve(context)))
            .WithStats(unresolved.Entries.Select(e => e.Stat?.Resolve(context)))
            .WithConditions(unresolved.Entries.Select(e => e.Condition?.Resolve(context)))
            .WithValueConverter(v => unresolved.ValueConverter(v)?.Resolve(context))
            .WithStatConverter(s => unresolved.StatConverter(s)?.Resolve(context))
            .Build());
 }
Exemple #2
0
        public IIntermediateModifier Resolve(IIntermediateModifier unresolved, ResolveContext context)
        {
            var entries = unresolved.Entries;

            return(_builder
                   .WithValues(Resolve(entries, e => e.Value, context))
                   .WithForms(Resolve(entries, e => e.Form, context))
                   .WithStats(Resolve(entries, e => e.Stat, context))
                   .WithConditions(Resolve(entries, e => e.Condition, context))
                   .WithValueConverter(v => unresolved.ValueConverter(v).Resolve(context))
                   .WithStatConverter(s => unresolved.StatConverter(s).Resolve(context))
                   .Build());
        }