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
builderIDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to.namestringThe name of the resource.scriptPath stringThe path to the script that Deno will execute.workingDirectory string?optionalThe working directory to use for the command. If null, the working directory of the current process is used.permissionFlags string[]? 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
builderIDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to.namestringThe name of the resource.workingDirectory string?optionalThe working directory to use for the command. If null, the working directory of the current process is used.taskName stringoptionalThe 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.configureInstaller Action<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 AppHosts. Use
DenoAppHostingExtensions.WithDenoPackageInstallation instead.