示例#1
0
 public void GetValueVoid([PathVariable] int id, [RequestParam] string test, [RequestQuery] TestServiceParam param)
 {
     try
     {
         Task.FromResult(new QueryResult <JObject>());
     }
     catch (Exception)
     {
         _testService1.GetValueVoidAsync(id, test, param);
     }
 }
示例#2
0
 public QueryResult <JObject> GetQueryResultValue([PathVariable("id")] string id, [RequestQuery] TestServiceParam param)
 {
     try
     {
         return(new QueryResult <JObject>());
     }
     catch (Exception)
     {
         return(_testService1.GetQueryResultValue(id, param));
     }
 }
示例#3
0
 public Task <JObject> GetValueAsync([PathVariable] int id, [RequestParam] string test, [RequestQuery] TestServiceParam param)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public Task <string> FormTestAsync([RequestForm] TestServiceParam param)
 {
     throw new NotImplementedException();
 }
示例#5
0
 public Task <QueryResult <JObject> > GetQueryResultValueAsync([PathVariable("id")] string id, [RequestQuery] TestServiceParam param)
 {
     try
     {
         return(Task.FromResult(new QueryResult <JObject>()));
     }
     catch (Exception)
     {
         return(_testService1.GetQueryResultValueAsync(id, param));
     }
 }
示例#6
0
 public Task <string> UploadFileAsync(IRequestFile file, TestServiceParam param)
 {
     throw new NotImplementedException();
 }
示例#7
0
 public Task PostValueForm2Async([PathVariable] int id, [RequestParam] string test, [RequestForm] TestServiceParam param1, [RequestForm] TestServiceParam param2)
 {
     throw new NotImplementedException();
 }
示例#8
0
 public void GetValueVoid([PathVariable] int id, [RequestParam] TestServiceParam queryParam, [RequestQuery] TestServiceParam param)
 {
 }
示例#9
0
 public Task PostValueAsync([PathVariable] int id, [RequestParam] string test, [RequestBody] TestServiceParam param)
 {
     //return _testService1.PostValueAsync(id, test, param);
     return(Task.FromResult <object>(null));
 }
示例#10
0
 public Task <IQueryResult <TestServiceParam> > GetQueryResultValueAsync([PathVariable("id")] string id, [RequestQuery] TestServiceParam param)
 {
     return(Task.FromResult <IQueryResult <TestServiceParam> >(new QueryResult <TestServiceParam>()
     {
         Data = param,
         StatusCode = System.Net.HttpStatusCode.BadRequest
     }));
 }
示例#11
0
 public IQueryResult <TestServiceParam> GetQueryResultValue([PathVariable("id")] string id, [RequestQuery] TestServiceParam param)
 {
     return(new QueryResult <TestServiceParam>()
     {
         Data = param,
         StatusCode = System.Net.HttpStatusCode.BadRequest
     });
 }
        public Task <JObject> GetValueAsync([PathVariable("id")] string id, string text, TestServiceParam param)
        {
            Lazy <Task <JObject> > lazy     = new Lazy <Task <JObject> >();
            Func <Task <JObject> > fallback = new Func <Task <JObject> >(delegate
            {
                return(_testService2.GetValueAsync(int.Parse(id), text, param));
            });

            return(GetValueAsync(id, fallback));
        }