mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
25 lines
816 B
C#
25 lines
816 B
C#
using System;
|
|
|
|
namespace Microsoft.AspNetCore.NodeServices
|
|
{
|
|
/// <summary>
|
|
/// Supplies INodeServices instances.
|
|
/// </summary>
|
|
public static class NodeServicesFactory
|
|
{
|
|
/// <summary>
|
|
/// Create an <see cref="INodeServices"/> instance according to the supplied options.
|
|
/// </summary>
|
|
/// <param name="options">Options for creating the <see cref="INodeServices"/> instance.</param>
|
|
/// <returns>An <see cref="INodeServices"/> instance.</returns>
|
|
public static INodeServices CreateNodeServices(NodeServicesOptions options)
|
|
{
|
|
if (options == null)
|
|
{
|
|
throw new ArgumentNullException(nameof (options));
|
|
}
|
|
|
|
return new NodeServicesImpl(options.NodeInstanceFactory);
|
|
}
|
|
}
|
|
} |