mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Change all Microsoft.AspNet.* namespaces and references to Microsoft.AspNetCore.*
This commit is contained in:
@@ -2,7 +2,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public static class Configuration {
|
||||
private readonly static string[] defaultWatchFileExtensions = new[] { ".js", ".jsx", ".ts", ".tsx", ".json", ".html" };
|
||||
private readonly static NodeServicesOptions defaultOptions = new NodeServicesOptions {
|
||||
|
||||
@@ -52,10 +52,10 @@ var server = http.createServer(function(req, res) {
|
||||
|
||||
server.listen(requestedPortOrZero, 'localhost', function () {
|
||||
// Signal to HttpNodeHost which port it should make its HTTP connections on
|
||||
console.log('[Microsoft.AspNet.NodeServices.HttpNodeHost:Listening on port ' + server.address().port + '\]');
|
||||
console.log('[Microsoft.AspNetCore.NodeServices.HttpNodeHost:Listening on port ' + server.address().port + '\]');
|
||||
|
||||
// Signal to the NodeServices base class that we're ready to accept invocations
|
||||
console.log('[Microsoft.AspNet.NodeServices:Listening]');
|
||||
console.log('[Microsoft.AspNetCore.NodeServices:Listening]');
|
||||
});
|
||||
|
||||
function readRequestBodyAsJson(request, callback) {
|
||||
|
||||
@@ -20,4 +20,4 @@ readline.createInterface({ input: process.stdin }).on('line', function (message)
|
||||
}
|
||||
});
|
||||
|
||||
console.log('[Microsoft.AspNet.NodeServices:Listening]'); // The .NET app waits for this signal before sending any invocations
|
||||
console.log('[Microsoft.AspNetCore.NodeServices:Listening]'); // The .NET app waits for this signal before sending any invocations
|
||||
|
||||
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
internal class HttpNodeInstance : OutOfProcessNodeInstance {
|
||||
private readonly static Regex PortMessageRegex = new Regex(@"^\[Microsoft.AspNet.NodeServices.HttpNodeHost:Listening on port (\d+)\]$");
|
||||
private readonly static Regex PortMessageRegex = new Regex(@"^\[Microsoft.AspNetCore.NodeServices.HttpNodeHost:Listening on port (\d+)\]$");
|
||||
|
||||
private readonly static JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings {
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
// This is just to demonstrate that other transports are possible. This implementation is extremely
|
||||
// dubious - if the Node-side code fails to conform to the expected protocol in any way (e.g., has an
|
||||
// error), then it will just hang forever. So don't use this.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public class NodeInvocationInfo
|
||||
{
|
||||
public string ModuleName;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
/**
|
||||
* Class responsible for launching the Node child process, determining when it is ready to accept invocations,
|
||||
* and finally killing it when the parent process exits. Also it restarts the child process if it dies.
|
||||
@@ -91,7 +91,7 @@ namespace Microsoft.AspNet.NodeServices {
|
||||
this._nodeProcessIsReadySource = new TaskCompletionSource<bool>();
|
||||
|
||||
this._nodeProcess.OutputDataReceived += (sender, evt) => {
|
||||
if (evt.Data == "[Microsoft.AspNet.NodeServices:Listening]" && !initializationIsCompleted) {
|
||||
if (evt.Data == "[Microsoft.AspNetCore.NodeServices:Listening]" && !initializationIsCompleted) {
|
||||
this._nodeProcessIsReadySource.SetResult(true);
|
||||
initializationIsCompleted = true;
|
||||
} else if (evt.Data != null) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public interface INodeServices : IDisposable {
|
||||
Task<T> Invoke<T>(string moduleName, params object[] args);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>b0fa4175-8b29-4904-9780-28b3c24b0567</ProjectGuid>
|
||||
<RootNamespace>Microsoft.AspNet.NodeServices</RootNamespace>
|
||||
<RootNamespace>Microsoft.AspNetCore.NodeServices</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\NodeServices.sln\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\NodeServices.sln\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
|
||||
</PropertyGroup>
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public enum NodeHostingModel {
|
||||
Http,
|
||||
InputOutputStream,
|
||||
|
||||
@@ -2,7 +2,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public static class EmbeddedResourceReader {
|
||||
public static string Read(Type assemblyContainingType, string path) {
|
||||
var asm = assemblyContainingType.GetTypeInfo().Assembly;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.AspNet.NodeServices {
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
// Makes it easier to pass script files to Node in a way that's sure to clean up after the process exits
|
||||
public sealed class StringAsTempFile : IDisposable {
|
||||
public string FileName { get; private set; }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "Invoke Node.js modules at runtime in ASP.NET 5 applications.",
|
||||
"description": "Invoke Node.js modules at runtime in ASP.NET Core applications.",
|
||||
"compilationOptions": {
|
||||
"keyFile": "../../tools/Key.snk"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user