コード例 #1
0
        public object Any(Hello request)
        {
            // this method is never called as it it is overridden with the Get, Post, Put methods
            HelloResponse a = new HelloResponse();
            a.Result = "Hello, " + Convert.ToString(request.Name);

            var req = this.RequestContext.Get<IHttpRequest>();
            string id = req.Items["userid"].ToString();

            a.Result += System.Environment.NewLine + System.Environment.NewLine;
            a.Result += " " + id;

            return a;
        }
コード例 #2
0
 public HelloResponse Put(Hello request)
 {
     var response = new HelloResponse();
     response.Result = "Put Response" + request.Name;
     return response;
 }
コード例 #3
0
 public HelloResponse Get(Hello request)
 {
     var response = new HelloResponse();
     response.Result = "Get Response: " + request.Name;
     return response;
 }