KitchenPC.Imp
0.3.0
dotnet add package KitchenPC.Imp --version 0.3.0
NuGet\Install-Package KitchenPC.Imp -Version 0.3.0
<PackageReference Include="KitchenPC.Imp" Version="0.3.0" />
<PackageVersion Include="KitchenPC.Imp" Version="0.3.0" />
<PackageReference Include="KitchenPC.Imp" />
paket add KitchenPC.Imp --version 0.3.0
#r "nuget: KitchenPC.Imp, 0.3.0"
#:package KitchenPC.Imp@0.3.0
#addin nuget:?package=KitchenPC.Imp&version=0.3.0
#tool nuget:?package=KitchenPC.Imp&version=0.3.0
Imp
Imp (In Memory Pages) is a lightweight page framework built on ASP.NET Core middleware. It maps request paths to .NET classes, creates pages through dependency injection, binds query-string values to page properties, and renders responses directly or through embedded XML templates.
Imp supports the actively maintained .NET 8 and .NET 10 LTS releases.
The idea in one example
Given this page class:
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Imp;
using Microsoft.AspNetCore.Http;
namespace MySite.Pages;
public sealed class Hello : BasePage
{
public string Name { get; set; } = "World";
public override Task Render(HttpResponse response)
{
string name = HtmlEncoder.Default.Encode(Name);
return response.WriteAsync($"<h1>Hello, {name}!</h1>");
}
}
Imp maps the request:
/hello?Name=Mike
to MySite.Pages.Hello, binds Mike to its Name property, and renders:
<h1>Hello, Mike!</h1>
That is Imp's central model: URL paths map to page classes, and query-string parameters map to public writable properties. Query-property names are case-sensitive, so this example uses Name, not name.
Get started
Install the package:
dotnet add package KitchenPC.Imp
Then follow the Wiki's Getting Started guide to configure the middleware and create your first page.
For a complete working application, see the Todo sample or read its guided tour.
Response headers (0.3.0)
Declare response headers directly on page classes:
[ResponseHeader(ResponseHeader.CacheControl, "private, no-store")]
public sealed class Account : BasePage { }
Subclass ResponseHeaderAttribute for request-dependent policies with scoped DI.
Imp applies inherited policies before authentication callbacks and lifecycle methods;
page code can override them later. See Response headers
for custom attribute examples, precedence, and migration guidance.
Documentation
The Imp Wiki contains the complete developer guide:
- Architecture and request lifecycle
- Routing and page classes
- Pages and direct rendering
- Embedded templates and layouts
- Dynamic content, constants, and loops
- Forms, postbacks, and antiforgery
- Dependency injection and lifetimes
- Response headers
- Authentication and secure pages
- Static assets and CDN paths
- Configuration reference
- API quick reference
- Testing and diagnostics
- Troubleshooting
Build and test
From the repository root:
dotnet test
To create local NuGet and symbol packages:
dotnet pack src/Imp/Imp.csproj --configuration Release --output artifacts
See Build, Package, and Contribute for repository structure, release details, and contribution guidance.
License
Imp is available under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.