public cJSONDataSource add(cJSONDataSource dataSource, String name) { try { if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (name == "") { throw new ArgumentNullException("name"); } Add(name.ToLower(), dataSource); return(dataSource); } catch { return(null); } }
public static void registerDataSource(cJSONDataSource dataSource, string name) { m_dataSources.add(dataSource, name); }
public cJSONDataReader(cJSONDataSource dataSource) { m_dataSource = dataSource; m_cols = m_dataSource.getData()["columns"] as JArray; m_rows = m_dataSource.getData()["rows"] as JArray; }
public cJSONDataSource add(cJSONDataSource dataSource, String name) { try { if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (name == "") { throw new ArgumentNullException("name"); } Add(name.ToLower(), dataSource); return dataSource; } catch { return null; } }
private void registerDataSource(JObject request) { var dataSources = request["message"]["data"]["data"]; foreach (var dataSource in dataSources) { cJSONDataSource ds = new cJSONDataSource(dataSource["name"].ToString(), dataSource["data"] as JObject); cJSONServer.registerDataSource(ds, m_database + "." + ds.getName()); } }