using System; namespace Microsoft.AspNetCore.NodeServices.Sockets { /// /// Extension methods that help with populating a object. /// public static class NodeServicesOptionsExtensions { /// /// Configures the service so that it will use out-of-process /// Node.js instances and perform RPC calls over binary sockets (on Windows, this is /// implemented as named pipes; on other platforms it uses domain sockets). /// public static void UseSocketHosting(this NodeServicesOptions options) { var pipeName = "pni-" + Guid.NewGuid().ToString("D"); // Arbitrary non-clashing string options.NodeInstanceFactory = () => new SocketNodeInstance(options, pipeName); } } }