protected Response <string> createObj(string clazz, object obj) { Db.Table t = proxy.db.Tables[clazz]; string opaque_ref = proxy.CreateOpaqueRef(); Db.Row r = t.Rows.Add(opaque_ref); r.PopulateFrom(DbProxy.ProxyToHashtable(obj.GetType(), obj)); proxy.SendCreateObject(clazz, opaque_ref); return(new Response <string>(opaque_ref)); }
public Response <string> create(string session, Proxy_VIF vif) { Db.Table t = proxy.db.Tables["vif"]; string opaque_ref = proxy.CreateOpaqueRef(); Db.Row r = t.Rows.Add(opaque_ref); r.PopulateFrom(DbProxy.ProxyToHashtable(typeof(Proxy_VIF), vif)); proxy.SendCreateObject("vif", opaque_ref); return(new Response <string>(opaque_ref)); }
public Response <Object> get_all_records() { Db.Table table = proxy.db.Tables[clazz.ToLower()]; Hashtable result = new Hashtable(); foreach (KeyValuePair <string, Db.Row> row in table.Rows) { Hashtable o = new Hashtable(); foreach (string propName in row.Value.Props.Keys) { o[propName] = row.Value.Props[propName].XapiObjectValue; } result[row.Key] = o; } return(new Response <Object>(result)); }