Add react tag helper. Clean up code and make it more consistent.

This commit is contained in:
SteveSandersonMS
2015-11-04 12:19:43 -08:00
parent e410affbd8
commit 7c3d22c7b6
14 changed files with 146 additions and 63 deletions

View File

@@ -12,15 +12,11 @@ namespace Microsoft.AspNet.NodeServices.React
nodeScript = new StringAsTempFile(script); // Will be cleaned up on process exit
}
public static Task<string> RenderToString(INodeServices nodeServices, string moduleName, string baseUrl) {
return RenderToString(nodeServices, moduleName, /* exportName */ null, baseUrl);
}
public static async Task<string> RenderToString(INodeServices nodeServices, string moduleName, string exportName, string baseUrl) {
public static async Task<string> RenderToString(INodeServices nodeServices, string componentModuleName, string componentExportName, string requestUrl) {
return await nodeServices.InvokeExport(nodeScript.FileName, "renderToString", new {
moduleName,
exportName,
baseUrl
moduleName = componentModuleName,
exportName = componentExportName,
requestUrl = requestUrl
});
}
}