DenoAppHostingExtensions Methods
ClassMethods3 members
Extension methods to support adding Deno to the
Hosting.IDistributedApplicationBuilder. AddDenoApp(IDistributedApplicationBuilder, string, string, string?, string[]?, string[]?)Section titled AddDenoApp(IDistributedApplicationBuilder, string, string, string?, string[]?, string[]?)extensionIResourceBuilder<DenoAppResource> Adds a Deno application to the application model. Deno should available on the PATH.
public static class DenoAppHostingExtensions{ public static IResourceBuilder<DenoAppResource> AddDenoApp( this IDistributedApplicationBuilder builder, string name, string scriptPath, string? workingDirectory = null, string[]? permissionFlags = null, string[]? args = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to add the resource to.namestringThe name of the resource.scriptPathstringThe path to the script that Deno will execute.workingDirectorystring?optionalThe working directory to use for the command. If null, the working directory of the current process is used.permissionFlagsstring[]?optionalThe permissions to grant to the program run.argsstring[]?optionalThe arguments to pass to the command.Returns
IResourceBuilder<DenoAppResource>A reference to the ApplicationModel.IResourceBuilder`1.AddDenoTask(IDistributedApplicationBuilder, string, string?, string, string[]?)Section titled AddDenoTask(IDistributedApplicationBuilder, string, string?, string, string[]?)extensionIResourceBuilder<DenoAppResource> Adds a Deno task to the distributed application builder
public static class DenoAppHostingExtensions{ public static IResourceBuilder<DenoAppResource> AddDenoTask( this IDistributedApplicationBuilder builder, string name, string? workingDirectory = null, string taskName = "start", string[]? args = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to add the resource to.namestringThe name of the resource.workingDirectorystring?optionalThe working directory to use for the command. If null, the working directory of the current process is used.taskNamestringoptionalThe deno task to execute. Defaults to "start".argsstring[]?optionalThe arguments to pass to the command.Returns
IResourceBuilder<DenoAppResource>A reference to the ApplicationModel.IResourceBuilder`1.WithDenoPackageInstallation(IResourceBuilder<DenoAppResource>, Action<IResourceBuilder<DenoInstallerResource>>)Section titled WithDenoPackageInstallation(IResourceBuilder<DenoAppResource>, Action<IResourceBuilder<DenoInstallerResource>>)extensionIResourceBuilder<DenoAppResource> Ensures the Deno packages are installed before the application starts using Deno as the package manager.
public static class DenoAppHostingExtensions{ public static IResourceBuilder<DenoAppResource> WithDenoPackageInstallation( this IResourceBuilder<DenoAppResource> resource, Action<IResourceBuilder<DenoInstallerResource>>? configureInstaller = null) { // ... }}Parameters
resourceIResourceBuilder<DenoAppResource>The Deno app resource.configureInstallerAction<IResourceBuilder<DenoInstallerResource>>optionalConfigure the Deno installer resource.Returns
IResourceBuilder<DenoAppResource>A reference to the ApplicationModel.IResourceBuilder`1.Remarks
This overload is not available in polyglot app hosts. Use
DenoAppHostingExtensions.WithDenoPackageInstallation instead.