Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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.
 }
Ejemplo n.º 4
0
 public override string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues)
 {
     return(Text);
 }
Ejemplo n.º 5
0
 public abstract string Render(ContextNode contextNode, ContextValueDictionary cvd, int recNum, IReadOnlyList <ContextValue> contextValues);