Esempio n. 1
0
        public bool EditEmployee(int id, [BodyParameter] Employee emp, BeetleX.FastHttpApi.HttpResponse response)
        {
            Employee record = mEmployees.Find(e => e.EmployeeID == id);

            if (record != null)
            {
                record.City      = emp.City;
                record.Address   = emp.Address;
                record.Title     = emp.Title;
                record.HomePhone = emp.HomePhone;
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 public abstract object GetValue(HttpRequest request, HttpResponse response);
Esempio n. 3
0
 public object Invoke(HttpRequest request, HttpResponse response)
 {
     object[] parameters = GetValues(request, response);
     return(mMethodHandler.Execute(Controller, parameters));
 }
Esempio n. 4
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "304";
     response.CodeMsg = "Not Modified";
     response.Request.ClearStream();
 }
Esempio n. 5
0
 public void Write(PipeStream stream, HttpResponse response)
 {
 }
Esempio n. 6
0
 public void Write(PipeStream stream, HttpResponse response)
 {
     stream.WriteLine(Error);
     stream.WriteLine(Code);
 }
Esempio n. 7
0
 public void Write(PipeStream stream, HttpResponse response)
 {
     stream.Write(Message);
 }
Esempio n. 8
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "301";
     response.CodeMsg = "Moved Permanently";
     response.Header[HeaderTypeFactory.LOCATION] = Location;
 }
Esempio n. 9
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "302";
     response.CodeMsg = "found";
     response.Header[HeaderTypeFactory.LOCATION] = Location;
 }
Esempio n. 10
0
 public void Setting(HttpResponse response)
 {
 }
Esempio n. 11
0
        public void Write(PipeStream stream, HttpResponse response)
        {
            string value = Newtonsoft.Json.JsonConvert.SerializeObject(Data);

            stream.Write(value);
        }
Esempio n. 12
0
 public void Write(PipeStream stream, HttpResponse response)
 {
     stream.Write(Text);
 }
Esempio n. 13
0
 public void Write(PipeStream stream, HttpResponse response)
 {
     throw new NotImplementedException();
 }
Esempio n. 14
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "403";
     response.CodeMsg = "not support";
     response.Request.ClearStream();
 }
Esempio n. 15
0
 public override object GetValue(HttpRequest request, HttpResponse response)
 {
     return(request.GetBody(this.Type));
 }
Esempio n. 16
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "404";
     response.CodeMsg = "not found";
     response.Request.ClearStream();
 }
Esempio n. 17
0
 public override object GetValue(HttpRequest request, HttpResponse response)
 {
     return(null);
 }
Esempio n. 18
0
 public void Setting(HttpResponse response)
 {
     response.Code    = "500";
     response.CodeMsg = "server inner error!";
     response.Request.ClearStream();
 }