Ejemplo n.º 1
0
 static RestHandler()
 {
     RestCallHandlers.Add(RestCall.Create(HttpMethods.Get, false), async(c, r) => (object)(await c.Get(r)));
     RestCallHandlers.Add(RestCall.Create(HttpMethods.Get, true), async(c, r) => (object)(await c.GetItem(r)));
     RestCallHandlers.Add(RestCall.Create(HttpMethods.Post, false), async(c, r) => (object)(await c.Create(r)));
     RestCallHandlers.Add(RestCall.Create(HttpMethods.Put, true), async(c, r) => (object)(await c.Upsert(r)));
     RestCallHandlers.Add(RestCall.Create(HttpMethods.Delete, true), async(c, r) => (object)(await c.Delete(r)));
 }