Class NovaRazorModel
The Nova Razor page model used for RazorViews
Inherited Members
Namespace: Noxum.Nova.Razor.Model
Assembly: Noxum.Nova.Razor.Model.dll
Syntax
public sealed class NovaRazorModel
Properties
Branch
Get the current branch
Declaration
public NovaRazorBranch Branch { get; }
Property Value
| Type | Description |
|---|---|
| NovaRazorBranch |
Languages
Get the list of languages for the current request
Declaration
public IReadOnlyList<NovaRazorLanguage> Languages { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<NovaRazorLanguage> |
Objects
Get a sorted list of objects to render
Declaration
public IReadOnlyList<NovaRazorObject> Objects { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<NovaRazorObject> |
OutputCulture
Get the current output culture to use. For a user-created Preview or a Job, this is the UI culture of the user. The output culture may be used as base language and as the formatting provider for rendering.
Declaration
public CultureInfo OutputCulture { get; }
Property Value
| Type | Description |
|---|---|
| CultureInfo |
OutputLanguage
Get the current language to use for rendering. For a user-created Preview or a Job, this is the UI language of the user. The output language may be used as the base language and as the formatting provider for rendering.
Declaration
public NovaRazorLanguage OutputLanguage { get; }
Property Value
| Type | Description |
|---|---|
| NovaRazorLanguage |
OutputMediaType
Gets or sets the media type of the output content, e.g., "text/html" or "application/vnd.noxum.ipub". (default: text/html)
Declaration
public string OutputMediaType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Variants
Maps variant axis (i.e. object types) to a list of variants for the current request.
Declaration
public IReadOnlyDictionary<NovaRazorObjectType, IReadOnlyList<NovaRazorObject>> Variants { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<NovaRazorObjectType, IReadOnlyList<NovaRazorObject>> |
Methods
CreateAsync(NovaRazorContext, IEnumerable<ObjId>)
Factory method to create a new instance
Declaration
public static Task<NovaRazorModel> CreateAsync(NovaRazorContext context, IEnumerable<ObjId> objs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NovaRazorContext | context | |
| IEnumerable<ObjId> | objs |
Returns
| Type | Description |
|---|---|
| Task<NovaRazorModel> |