Exemplo n.º 1
0
        public override string GetScript()
        {
            IEnumerable items = GetItems();

            return(string.Format(CultureInfo.InvariantCulture, "Q.ScriptData.set({0}, new Q.Lookup({1}, \n{2}\n));",
                                 ("Lookup." + LookupKey).ToSingleQuoted(), LookupParams.ToJson(), items.ToJson()));
        }
Exemplo n.º 2
0
        public override string GetScript()
        {
            IEnumerable items = getItems();

            return(String.Format("Q$ScriptData.set({0}, new Q$Lookup({1}, \n{2}\n));",
                                 ("Lookup." + LookupKey).ToSingleQuoted(), LookupParams.ToJson(), items.ToJson()));
        }
Exemplo n.º 3
0
        public string GetScript()
        {
            IEnumerable items;

            using (var connection = CreateConnection())
            {
                items = _getItems(connection);
            }
            return(String.Format("Q$ScriptData.set({0}, new Q$Lookup({1}, \n{2}\n));",
                                 ("Lookup." + _lookup).ToSingleQuoted(), LookupParams.ToJson(), items.ToJson()));
        }
 public override string GetScript()
 {
     return("Q.ScriptData.set(" + ("Lookup." + LookupKey).ToSingleQuoted() +
            ", new Q.Lookup(" + LookupParams.ToJson() + ", " + getItems().ToJson() +
            ".map(function(x) { return { v: x }; })));");
 }