public void Write(string key, object value) { using (var scope = new SinghamScope("dataService.connection.write")) { this.Db.Store.Write(key, value); } }
public void Delete(string key) { using (var scope = new SinghamScope("dataService.connection.delete")) { this.Db.Store.Delete(key); } }
public object Read(string key) { using (var scope = new SinghamScope("dataService.connection.read")) { return this.Db.Store.Read(key); } }
public void Write(string key, object value) { using (var scope = new SinghamScope("dataService.connection.write")) { this.Db.Store.Write(key, value); } }
public void Delete(string key) { using (var scope = new SinghamScope("dataService.connection.delete")) { this.Db.Store.Delete(key); } }
public object Read(string key) { using (var scope = new SinghamScope("dataService.connection.read")) { return(this.Db.Store.Read(key)); } }
public Connection CreateConnection() { using (var scope = new SinghamScope("dataService.getSession")) { int sessionId = GetSession (); return new Connection (this, sessionId); } }
public Connection CreateConnection() { using (var scope = new SinghamScope("dataService.getSession")) { int sessionId = GetSession(); return(new Connection(this, sessionId)); } }
private void ExecuteDelete(HttpContext context) { using (var scope = new SinghamScope("dataService.delete")) { var key = IdGenerator.Next(1000); using (var conn = Global.Db.CreateConnection()) { conn.Delete(key.ToString()); } context.Response.Write("Deleted from db."); } }
private void ExecuteWrite(HttpContext context) { using (var scope = new SinghamScope("dataService.write")) { var key = IdGenerator.Next (1000); using (var conn = Global.Db.CreateConnection()) { conn.Write (key.ToString (), key.ToString ()); } context.Response.Write ("Written to db."); } }
private void ExecuteRead(HttpContext context) { using (var scope = new SinghamScope("dataService.read")) { using (var conn = Global.Db.CreateConnection()) { var id = IdGenerator.Next(1000); var value = conn.Read(id.ToString()); context.Response.Write("Value: " + (value == null ? "NULL" : value.ToString())); } } }
private void ExecuteRead(HttpContext context) { using( var scope = new SinghamScope("dataService.read")) { using (var conn = Global.Db.CreateConnection()) { var id = IdGenerator.Next(1000); var value = conn.Read(id.ToString()); context.Response.Write("Value: " + ( value == null ? "NULL" : value.ToString()) ); } } }
public virtual void ProcessRequest(HttpContext context) { using( var scope = new SinghamScope("dataService.call") ) { var operation = context.Request.Params["operation"]; if( operation.Equals("read", StringComparison.OrdinalIgnoreCase) == true ) ExecuteRead(context); else if( operation.Equals("write", StringComparison.OrdinalIgnoreCase) == true ) ExecuteWrite(context); else if( operation.Equals("delete", StringComparison.OrdinalIgnoreCase) == true ) ExecuteDelete(context); } }
public virtual void ProcessRequest(HttpContext context) { using (var scope = new SinghamScope("dataService.call")) { var operation = context.Request.Params["operation"]; if (operation.Equals("read", StringComparison.OrdinalIgnoreCase) == true) { ExecuteRead(context); } else if (operation.Equals("write", StringComparison.OrdinalIgnoreCase) == true) { ExecuteWrite(context); } else if (operation.Equals("delete", StringComparison.OrdinalIgnoreCase) == true) { ExecuteDelete(context); } } }