Ark.Framework.Abstractions 9.1.0

dotnet add package Ark.Framework.Abstractions --version 9.1.0
                    
NuGet\Install-Package Ark.Framework.Abstractions -Version 9.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ark.Framework.Abstractions" Version="9.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ark.Framework.Abstractions" Version="9.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Ark.Framework.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ark.Framework.Abstractions --version 9.1.0
                    
#r "nuget: Ark.Framework.Abstractions, 9.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ark.Framework.Abstractions@9.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ark.Framework.Abstractions&version=9.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Ark.Framework.Abstractions&version=9.1.0
                    
Install as a Cake Tool

Ark.Framework.Abstractions

The content model of Ark: base classes and attributes for content types, the repository and published-content interfaces, users, access, events and file seams. It also ships the source generator that writes the persistence code for every [ContentType] class.

Install

dotnet add package Ark.Framework.Abstractions - no other Ark packages. Reference it (or a package that brings it) from the project that holds your content types.

Setup

Nothing to register: declare content types and the generator does the rest at build time.

[ContentType]
public class NewsContent : Content
{
    [ContentProperty(PropertyEditor.Text)] public string Heading { get; set; } = null!;   // required
    [CultureSpecific, ContentProperty(PropertyEditor.Markdown)] public string? Body { get; set; }
}

The generator emits a ContentTypeKey enum (one value per type) with a global using ContentTypeKey = ...; alias, and the EF Core tables of each type.

Main entry points

  • Content, FileContent - the base classes of content types and uploaded files.
  • [ContentType], [ContentProperty], [CultureSpecific], [ContentTab], [DisplayText] - declare a type, its editable properties, their tabs and what the CMS calls them.
  • ContentReference<T>, ContentReferenceList<T> - typed pointers to other items.
  • LinkUrl<T> - a link to an item of the site (by id, its URL resolved on delivery) or to an external address.
  • IContentRepository - system-level reads and writes, not filtered by access rules.
  • IPublishedContentLoader - live content for a public site, access-filtered and cached.
  • IContentEventHandler<TEvent> - reacts to content events after a write commits.
  • IArkUserAdapter, IArkGroupDirectory - who is acting, and the groups access rules can name.
  • IArkSystemUsers - run code with no signed-in user (a job, an import) as a declared system user, which may save and publish.
  • IFileStore, IImageProcessor - where files are kept and how images are resized.
  • IFrameworkDocumentation - the site's package READMEs and the framework guide.

Notes

  • [ContentProperty(ReadOnly = true)] - set by code only: shown read-only in the editing schema, and a change through the editing API is a 400.
  • string properties must have a value (enforced on every save); string? is optional and stores empty text as null. [Required] on string? is refused.
  • Generator diagnostics: ARK001 the ContentTypeKey alias was left out (add the using it names), ARK002 [ContentType] on a class that isn't Content, ARK003 [SettingsType] on a class that isn't SettingsData, ARK004 a property named like a member the framework sets (Language, Id, Name, Saved...): rename it.
  • Everything returned by IPublishedContentLoader is a copy: changing it saves nothing.
  • All dates are UTC.
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Ark.Framework.Abstractions:

Package Downloads
Ark.Framework.Infrastructure

CMS framework runtime: AddArk registration, EF Core DbContext, content repository, versioning and polymorphic queries.

Ark.Framework.Pages.Abstractions

Page content types for the CMS framework: PageContent, the page tree attributes and IPageService. Reference it from the project holding your content types; Ark.Framework.Pages does the rest.

Ark.Framework.Search.Abstractions

Search attributes for the CMS framework: [Searchable] and SearchMode. Reference it from the project holding your content types; Ark.Framework.Search does the rest.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.0 0 11/23/2026

v9.1.0: Public packages, content type display texts, search sort order, Markdown images and tables

**Breaking for the CMS UI package**
- The npm package is renamed from `@ark/cms` to `@arkframework/cms` (and `@ark/cms/client` to `@arkframework/cms/client`). Change the dependency and the imports. To install a release candidate, map the scope to the cms-packages feed in `.npmrc`: `@arkframework:registry=https://pkgs.dev.azure.com/antonkronosjo/CMS/_packaging/cms-packages/npm/registry/`.

**New**
- Public packages: stable versions are published to nuget.org (`Ark.Framework.*`) and npmjs.org (`@arkframework/cms`), so a site needs no feed for them. Release candidates stay on the cms-packages feed.
- Release notes: every package carries its release's notes (`<releaseNotes>` in the `.nuspec`), shown on nuget.org.
- Content type display texts: `[DisplayText(language, name)]` on a content type, settings type, property or tab (`Tab = "..."`), repeatable per CMS language, with `Description`, and `Group` on a content type. The API sends them as `displayTexts` on `GET /api/content/types`, the creation, update and settings schemas and `GET /api/settings`. The CMS UI shows them - create picker names, descriptions and groups, field labels and help texts, tab and type names - before the site's `resources`.
- Search sort order: `o.Sorts` on `MapArkSearch` lists the index fields visitors may sort by, such as `SearchSchema.FirstPublishedField`. `GET /api/search?sort={field}&desc=true` picks one; without `sort` the order is best match first, as before. A sort the site didn't allow is a 400; a field in `o.Sorts` that can't be sorted on stops the site at startup. `searchContent` in `@arkframework/cms/client` takes `sort` and `desc`.

**Fixed**
- The CMS Markdown editor keeps images, GFM tables and raw HTML. Before, editing any text saved it without its images and tables, and with its HTML escaped. A table may be saved reformatted, with the same cells.

**Docs**
- Guide: a section on the CMS editor UI, and where stable versions and release candidates come from.

No migrations.