Skip to content

WebActivatorEx

reference
1 min readUpdated

Kind: Service

Source: Pams/API/Pams.API/Pams.API.csproj (line 1)

Part of: Pams

NuGet package dependency

WebActivatorEx is a NuGet package dependency declared in Pams.API.csproj. It supports startup-time activation hooks in legacy .NET application configurations, allowing package-provided startup code to run when Pams.API starts.

Diagram

mermaid
sequenceDiagram
    participant Build as Build Process
    participant Api as Pams.API
    participant Activator as WebActivatorEx
    participant Startup as Package Startup Code

    Build->>Api: Restore NuGet dependencies
    Api->>Activator: Start application host
    Activator->>Startup: Invoke registered startup hooks
    Startup-->>Api: Apply startup configuration

Usage

ts
import { spawn } from "node:child_process";

// WebActivatorEx runs inside the Pams.API .NET host.
// JavaScript code does not import WebActivatorEx directly.
const apiProcess = spawn(
  "dotnet",
  ["run", "--project", "Pams/API/Pams.API/Pams.API.csproj"],
  { stdio: "inherit" }
);

apiProcess.on("exit", (code) => {
  console.log(`Pams.API stopped with exit code: ${code}`);
});

AI Coding Instructions

  • Keep the WebActivatorEx package reference in Pams.API.csproj when startup hooks depend on it.
  • Do not import WebActivatorEx from TypeScript or JavaScript; it runs in the .NET application host.
  • Check package-provided startup registrations when changing application initialization behavior.
  • Treat this dependency as part of the legacy application startup path when updating NuGet packages.

Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Injected or called by (1)

  • Pams.APIPams/API/Pams.API/Pams.API.csproj:1

Was this page helpful?

Download as PDF