public string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues) { StringBuilder sb = new StringBuilder(); foreach (var component in components) { sb.Append(component.Render(contextNode, cvd, recNum, contextValues)); } return(sb.ToString()); }
public override string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues) { var contextValue = contextValues.SingleOrDefault(cv => cv.Type == ValueEntity && cv.RecordNumber == recNum); string ret = String.Empty; if (contextValue != null) { ret = contextValue.Value; } return(ret); }
public ContextValueDictionary() { // TODO: What we load should be specific to the user and their session. Load(); CVD = this; // TODO: Remove this eventually, saving the cvd when the session terminates or some other mechanism. }
public override string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues) { return(Text); }
public abstract string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues);