Kestrun assembly global namespace public type description [Flags] enum KestrunApiContext Specifies the API context in which a Kestrun route or schedule can be executed. class KestrunRuntimeApiAttribute Attribute to specify runtime API context and notes for Kestrun routes or schedules.
Kestrun namespace public type description static class FixedTimeEquals Provides constant-time comparison methods to prevent timing attacks. static class KestrunHostManager Provides management functionality for KestrunHost instances, including creation, retrieval, starting, stopping, and destruction.
Kestrun.Authentication namespace public type description class ApiKeyAuthenticationOptions Options for API key authentication, including header names, validation, and claims issuance. class ApiKeyAuthHandler Handles API Key authentication for incoming HTTP requests. enum ApiKeyChallengeFormat Specifies the format for API key authentication challenges. record AuthenticationCodeSettings Represents the settings for authentication code, including language, code, extra imports, and references. class BasicAuthenticationOptions Options for configuring Basic Authentication in Kestrun. class BasicAuthHandler Handles Basic Authentication for HTTP requests. interface IAuthenticationCommonOptions Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IAuthHandler Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IClaimsCommonOptions Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. class JwtAuthenticationOptions Provides options for JWT authentication, including claim policies and custom claim issuance.
Kestrun.Certificates namespace public type description static class CertificateManager Drop-in replacement for Pode’s certificate helpers, powered by Bouncy Castle. record CsrResult Represents the result of creating a Certificate Signing Request (CSR), including the PEM-encoded CSR and the private key.
Kestrun.Claims namespace Kestrun.Hosting namespace public type description record KestrunContext Represents the context for a Kestrun request, including the request, response, HTTP context, and host. class KestrunHost Provides hosting and configuration for the Kestrun application, including service registration, middleware setup, and runspace pool management. static class KestrunHostAuthExtensions Provides extension methods for adding authentication and authorization schemes to the Kestrun host. static class KestrunHostMapExtensions Provides extension methods for mapping routes and handlers to the KestrunHost. static class KestrunHostRazorExtensions Provides extension methods for adding PowerShell and Razor Pages to a KestrunHost. static class KestrunHostScriptValidationExtensions Provides extension methods for validating C# scripts in the context of a KestrunHost. static class KestrunHostStaticFilesExtensions Provides extension methods for configuring static file, default file, favicon, and file server middleware in KestrunHost. static class KestrunHttpMiddlewareExtensions Provides extension methods for configuring common HTTP middleware in Kestrun. class NoopHostLifetime Minimal IHostLifetime that performs no blocking operations. Useful for scenarios like testing where the host lifecycle is externally managed.
Kestrun.Hosting.Options namespace public type description static class KestrelOptionsExtensions Provides extension methods for copying configuration between KestrelServerOptions instances. class KestrunOptions Simple options class for configuring Kestrel server settings. class ListenerOptions Configuration for an individual Kestrel listener. record MapRouteOptions Options for mapping a route, including pattern, HTTP verbs, script code, authorization, and metadata.
Kestrun.Jwt namespace public type description enum JwtAlgorithm Specifies supported JWT signing algorithms. static class JwtAlgorithmExtensions Provides extension methods for the JwtAlgorithm enum. class JwtBuilderResult Represents the result of building a JWT, including the token, key, builder, issue time, and expiration. static class JwtInspector Provides methods for inspecting and extracting parameters from JWT tokens. class JwtParameters Represents all parameters extracted from a JWT, including header fields, standard properties, and claims. class JwtTokenBuilder Fluent utility to create any flavour of JWS/JWE in one line.
Kestrun.Languages namespace public type description record CsGlobals Provides global and local variable dictionaries and context for C# delegate execution.
Kestrun.Logging namespace public type description static class LoggerConfigurationExtensions Convenience extensions for hooking Serilog loggers into LoggerManager
. static class LoggerExtensions Sanitized Serilog extensions to strip control chars (including CR/LF) from any string property values before writing the log. static class LoggerManager Manages a collection of named Serilog loggers and their configurations.
Kestrun.Logging.Data namespace public type description class ErrorRecordWrapper Wraps an ErrorRecord object to provide additional logging information. class InvocationInfoWrapper Wraps the PowerShell InvocationInfo object and exposes its properties for logging purposes.
Kestrun.Logging.Enrichers namespace public type description class ErrorRecordEnricher Enriches Serilog log events with error record and invocation info from WrapperException.
Kestrun.Logging.Enrichers.Extensions namespace public type description static class ErrorRecordEnricherExtensions Provides extension methods for enriching Serilog logs with error record information. static class ErrorRecordExtensions Provides extension methods for formatting error records and invocation info as tables.
Kestrun.Logging.Exceptions namespace public type description class WrapperException Represents an exception that wraps another exception and optionally an ErrorRecord.
Kestrun.Logging.Sinks namespace public type description class PowerShellSink A Serilog sink that formats log events and invokes a callback for PowerShell integration.
Kestrun.Logging.Sinks.Extensions namespace public type description static class PowerShellSinkExtensions Provides extension methods for configuring PowerShell sinks in Serilog logging.
Kestrun.Logging.Utils.Console namespace public type description class Padding Represents padding values for left and right sides, and provides methods to generate padding strings. class Table Represents a console table for formatted output with optional grid and padding.
Kestrun.Logging.Utils.Console.Extensions namespace public type description static class TableExtensions Provides extension methods for the Table
class.
Kestrun.Middleware namespace Kestrun.Models namespace public type description class ContentDispositionOptions Options for Content-Disposition header. enum ContentDispositionType Specifies the type of Content-Disposition header to use in the HTTP response. class KestrunRequest Represents a request model for Kestrun, containing HTTP method, path, query, headers, body, authorization, cookies, and form data. class KestrunResponse Represents an HTTP response in the Kestrun framework, providing methods to write various content types and manage headers, cookies, and status codes.
Kestrun.Razor namespace public type description static class PowerShellRazorPage Provides middleware for enabling PowerShell-backed Razor Pages, allowing execution of a sibling PowerShell script (.cshtml.ps1) for each Razor view ( .cshtml). class PwshKestrunModel Base PageModel that exposes whatever the sibling PowerShell script placed in HttpContext.Items["PageModel"]
.
Kestrun.Scheduling namespace public type description record JobInfo Represents a scheduled task with its configuration and state. record ScheduleReport Represents a report of scheduled jobs at a specific time. Contains the generation time and a list of job information. This is useful for monitoring and auditing scheduled tasks. class SchedulerService Represents a service for managing scheduled tasks. Provides methods to schedule, cancel, pause, resume, and report on tasks. This service is designed to run within a Kestrun application context. It supports both C# and PowerShell jobs, allowing for flexible scheduling options.
Kestrun.Scripting namespace Kestrun.SharedState namespace public type description static class SharedStateStore Thread‑safe, case‑insensitive global key/value store for reference‑type objects.
Kestrun.Utilities namespace public type description static class AssemblyAutoLoader Registers one or more folders that contain private assemblies and makes sure every DLL in those folders is available to PowerShell / scripts. Call PreloadAll
once at startup (or from PowerShell) and forget about “could not load assembly …” errors. static class BuildError Utilities for formatting PowerShell error streams into HTTP responses. static class CcUtilities Provides utility methods for Kestrun. static class HostingExtensions Provides extension methods for hosting Kestrun servers. [Flags] enum HttpVerb Common HTTP verbs recognized by the framework. static class HttpVerbExtensions Extension methods for the HttpVerb
enum. static class PowerShellModuleLocator Utility class to locate the Kestrun PowerShell module. It searches for the module in both development and production environments. static class RateLimiterOptionsExtensions Provides extension methods for copying rate limiter options and policies. class ReadOnlyDictionaryAdapter Adapts a non-generic IDictionary to a read-only dictionary with string keys and nullable object values. static class SecureStringUtils Provides utility methods for working with SecureString and ReadOnlySpan<char>. static class VariablesMap Provides utility methods for mapping and flattening variables from various sources. static class XmlHelper Helpers for converting arbitrary objects into XElement instances. static class YamlHelper Provides helper methods for serializing and deserializing YAML content, with special handling for PowerShell objects.
Table of contents