Exemplo n.º 1
0
 static ResourceHelper()
 {
     ResourceLoader.GetStringInternal = key => ResourcesService.Get(key);
 }
Exemplo n.º 2
0
 public async Task <IActionResult> Get(
     [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "resources/{resourceId}")] HttpRequest req,
     string resourceId, CancellationToken cancellationToken)
 {
     return(await _service.Get(req, Guid.Parse(resourceId), cancellationToken));
 }
 /// <summary>
 /// 获取资源文件
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public string GetResources(HttpContext context)
 {
     ResourcesService resourcesService = new ResourcesService(session);
     var list = resourcesService.Get();
     SessionFactory.CloseSession();
     var str = "Hello";
     return str;
 }