mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Design review: Change AddNodeServices to take an Action<NodeServicesOptions> like other aspects of MVC DI config
This commit is contained in:
@@ -15,10 +15,10 @@ namespace ConsoleApplication
|
||||
public static void Main(string[] args) {
|
||||
// Set up the DI system
|
||||
var services = new ServiceCollection();
|
||||
services.AddNodeServices(new NodeServicesOptions {
|
||||
HostingModel = NodeServicesOptions.DefaultNodeHostingModel,
|
||||
ProjectPath = Directory.GetCurrentDirectory(),
|
||||
WatchFileExtensions = new string[] {} // Don't watch anything
|
||||
services.AddNodeServices(options => {
|
||||
options.HostingModel = NodeServicesOptions.DefaultNodeHostingModel;
|
||||
options.ProjectPath = Directory.GetCurrentDirectory();
|
||||
options.WatchFileExtensions = new string[] {}; // Don't watch anything
|
||||
});
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user