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()); }
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()); }