10.1.1
Kontent.ai model generator for .NET 10.1.1
Fixes ContentTypeCodename on generated records to be a compile-time constant instead of an instance property.
For details on the 10.1.0 changes, see the 10.1.0 release notes.
Changes
ContentTypeCodenameis now apublic const string— previously emitted as an expression-bodied instance property (public string ContentTypeCodename => "article";), which required allocating an instance to read the value and could not be used in contexts that require a compile-time constant. It now emitspublic const string ContentTypeCodename = "article";, enabling use inswitch/caselabels (e.g., dispatching onitem.System.Type), attribute arguments, and static lookup tables. Collision handling (renaming conflicting element members to_ContentTypeCodename) is unchanged.
Migration
- Call sites that accessed
ContentTypeCodenamethrough an instance reference (e.g.,article.ContentTypeCodename) will no longer compile. Access it through the type name instead (Article.ContentTypeCodename).
Full Changelog: 10.1.0...10.1.1