Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 6233927

Browse files
committed
t
1 parent 1e85713 commit 6233927

File tree

8 files changed

+62664
-5
lines changed

8 files changed

+62664
-5
lines changed

samples/misc/NodeServicesExamples/Controllers/HomeController.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
using System;
12
using System.Threading.Tasks;
23
using Microsoft.AspNetCore.Mvc;
34
using Microsoft.AspNetCore.NodeServices;
45
using Microsoft.AspNetCore.SpaServices.Prerendering;
6+
using System.IO;
57

68
namespace NodeServicesExamples.Controllers
79
{
@@ -17,6 +19,16 @@ public IActionResult ES2015Transpilation()
1719
return View();
1820
}
1921

22+
public IActionResult Stream([FromServices] INodeServices nodeServices)
23+
{
24+
Console.WriteLine("start");
25+
var d = nodeServices.InvokeAsync<Stream>("./addNumbers");
26+
27+
Console.WriteLine(d);
28+
29+
return View();
30+
}
31+
2032
public async Task<IActionResult> Chart([FromServices] INodeServices nodeServices)
2133
{
2234
var options = new { width = 400, height = 200, showArea = true, showPoint = true, fullWidth = true };

0 commit comments

Comments
 (0)