Перейти до основного вмісту

Kandra.Attributes

Kandra.Attributes.Accounting.SubcontoIdAttribute

Tags one enum member with a fixed Guid identity, letting a hand-written enum act as a stable "subconto" (analytical accounting dimension) key without needing a backing dictionary table. Consumed together with EnumGuidDropdownAttribute/EnumGuidMultiSelectAttribute.

Constructors

ConstructorDescription
SubcontoIdAttribute(String)undocumented

Properties

PropertyDescription
IdThe member's fixed subconto identity, parsed from the constructor's id string.

Kandra.Attributes.Application.AccountTransactionsAttribute

Marks a Document behavior whose OnSubmitAsync/OnUnsubmitAsync posts to the chart-of-accounts ledger via IPostingService. A plain marker, no data - the same role RegisterTransactionsAttribute plays for the register engine, but for the accounting engine there's no per-account viewer generator yet, so this exists purely to flag "this document posts" for a future account-transactions-viewer generator to discover, the way [RegisterTransactions] is discovered for registers today.

Kandra.Attributes.Application.KandraBehaviorAttribute

Base marker for a behavior class. The only new fact declared here is the Form Dto link — a future generator deduces the Domain entity type by reflecting the behavior class's own closed generic interface (IDictionaryBehavior<TEntity>/IDocumentBehavior<TEntity>/...), never duplicated as a Type here, and looks up QueryDtoType/ResultDtoType/ValidatorType transitively from FormDtoType's own KandraFormAttribute once resolved.

Constructors

ConstructorDescription
KandraBehaviorAttribute(Type)undocumented

Properties

PropertyDescription
FormDtoTypeThe Dto type this behavior implements, whose own KandraFormAttribute supplies QueryDtoType/ResultDtoType/ValidatorType.

Kandra.Attributes.Application.KandraDataProcessorBehaviorAttribute

Marks a class as a data processor's backend behavior implementation, linking it (via the inherited FormDtoType) to its KandraDataProcessorFormAttribute-decorated input Dto.

Constructors

ConstructorDescription
KandraDataProcessorBehaviorAttribute(Type)undocumented

Kandra.Attributes.Application.KandraDataProcessorFormAttribute

Marks a Dto as a data-processor input form. Data processors use the TInput/TResult shape — adds the ResultDto link.

Properties

PropertyDescription
ResultDtoTypeThe Dto type returned by running this data processor.

Kandra.Attributes.Application.KandraDictionaryBehaviorAttribute

Marks a class as a dictionary's backend CRUD-behavior implementation, linking it (via the inherited FormDtoType) to its KandraDictionaryFormAttribute-decorated Dto.

Constructors

ConstructorDescription
KandraDictionaryBehaviorAttribute(Type)undocumented

Kandra.Attributes.Application.KandraDictionaryFormAttribute

Marks a Dto as a dictionary form. Dictionaries are list-queryable — adds the QueryDto link.

Properties

PropertyDescription
QueryDtoTypeThe Dto type used for this dictionary's list/query requests.

Kandra.Attributes.Application.KandraDocumentBehaviorAttribute

Marks a class as a document's backend CRUD-behavior implementation, linking it (via the inherited FormDtoType) to its KandraDocumentFormAttribute-decorated Dto.

Constructors

ConstructorDescription
KandraDocumentBehaviorAttribute(Type)undocumented

Kandra.Attributes.Application.KandraDocumentFormAttribute

Marks a Dto as a document form. Documents are list-queryable — adds the QueryDto link.

Properties

PropertyDescription
QueryDtoTypeThe Dto type used for this document's list/query requests.

Kandra.Attributes.Application.KandraFormAttribute

Base marker for a form-bearing Dto. Carries what every kind needs regardless of shape: the validator link and the API name. Deliberately no reference to the Domain entity type here — that link is declared on the behavior class instead (see KandraBehaviorAttribute), since the Dto/Forms layer must not reference Domain entity types and vice versa.

Properties

PropertyDescription
NameThe API name used verbatim by generated controllers and Refit clients: the controller class name ({Name}Controller), the route's [controller] segment, the closed Refit client interface name (I{Name}ApiClient), and its route path. Not derived by convention — irregular cases (e.g. a hierarchical dictionary's item Dto, or a report Dto named after its filters rather than its result) don't follow a simple pluralization rule, so this must be set explicitly.
SkipGenerationOpts this form out of one or more generators that would otherwise consume it.
ValidatorTypeThe shared client+server validator type used to validate this Dto.

Kandra.Attributes.Application.KandraHandlerAttribute

Marks a class as a handler's marker type (implements Kandra.Forms.Handlers.IHandler<TIn,TOut>). Name is the handler's key — must be unique across the whole system, checked by the discovering generator the same way duplicate entity/report/data-processor names are.

Properties

PropertyDescription
NameThe handler's unique key, used to look it up across the whole system.

Kandra.Attributes.Application.KandraHandlerBehaviorAttribute

Marks a class as a handler's backend implementation (implements Kandra.Application.Abstractions.Behaviors.IHandlerBehavior<TIn,TOut>). The constructor argument links back to the handler's own [KandraHandler]-marked type (in Forms) the same way KandraDocumentBehaviorAttribute links back to a document Dto — TIn/TOut/Key are all deduced from there, never duplicated here.

Constructors

ConstructorDescription
KandraHandlerBehaviorAttribute(Type)undocumented

Kandra.Attributes.Application.KandraLocalHandlerAttribute

Marks a class as a local (UI-only) handler's marker type (implements Kandra.Forms.Handlers.ILocalHandler). Name must be unique across the whole system — including against [KandraHandler] names — checked by the same discovering-generator pass that enforces remote-handler name uniqueness, for consistency with that requirement (a Dto property's [HandlerTrigger] attribute references the handler by Type, not by this name).

Properties

PropertyDescription
NameThe local handler's unique key, checked for uniqueness across both local and remote handler names.

Kandra.Attributes.Application.KandraReportBehaviorAttribute

Marks a class as a report's backend behavior implementation, linking it (via the inherited FormDtoType) to its KandraReportFormAttribute-decorated filters Dto.

Constructors

ConstructorDescription
KandraReportBehaviorAttribute(Type)undocumented

Kandra.Attributes.Application.KandraReportFormAttribute

Marks a Dto as a report filters form. Reports use the TFilters/TResult shape — adds the ResultDto link.

Properties

PropertyDescription
ResultDtoTypeThe Dto type returned by running this report.

Kandra.Attributes.Application.PermissionsFromAttribute

Declares that whoever calls this class must already hold the permission for Action on type (typically a Document/Dictionary Dto) - a way to "borrow" an existing entity's permission instead of standing up a standalone claim/policy for something like a handler that only makes sense in the context of editing that entity. Repeatable - multiple attributes on the same class must all pass (AND), the same way stacking multiple [Authorize] attributes does.

Constructors

ConstructorDescription
PermissionsFromAttribute(Type, ApplicationAction)undocumented

Properties

PropertyDescription
ActionThe action the caller must already be permitted to perform on Type.
TypeThe Dto type (typically a Document/Dictionary) whose permission is being borrowed.

Kandra.Attributes.Application.RegisterTransactionsAttribute

Declares one register row type (a Movement<,,> or DocumentInfoRecord<,> subclass) that this Document behavior's OnSubmitAsync/OnUnsubmitAsync/OnDeleteAsync writes to via ISubmitScope.GetWriter<>(). Purely declarative metadata for the register-transactions viewer generators — the engine never enforces that the behavior's own imperative register-writing code actually matches what's declared here. Repeatable: a document touching multiple registers carries one instance per register row type.

Constructors

ConstructorDescription
RegisterTransactionsAttribute(Type)Declares one register row type (a Movement<,,> or DocumentInfoRecord<,> subclass) that this Document behavior's OnSubmitAsync/OnUnsubmitAsync/OnDeleteAsync writes to via ISubmitScope.GetWriter<>(). Purely declarative metadata for the register-transactions viewer generators — the engine never enforces that the behavior's own imperative register-writing code actually matches what's declared here. Repeatable: a document touching multiple registers carries one instance per register row type.

Properties

PropertyDescription
RegisterRowTypeThe register row type this document behavior writes to.

Kandra.Attributes.Application.RequiresFeatureAttribute

Declares that a class is gated behind a Microsoft.FeatureManagement feature flag (by name, evaluated later against IFeatureManager/the JWT feature claims - see docs/kandra-gaps-tracking.md C12). Purely declarative for now: no generator or runtime reads it yet, this just reserves the vocabulary until a consumer (controller gating, UI section gating, etc.) is decided. Repeatable - multiple attributes on the same class are expected to all pass (AND), the same stacking convention PermissionsFromAttribute uses.

Constructors

ConstructorDescription
RequiresFeatureAttribute(String)undocumented

Properties

PropertyDescription
FeatureNameThe Microsoft.FeatureManagement feature flag name this class is gated behind.

Kandra.Attributes.Application.SourceForAttribute

Declares that this Document Dto can be used as the "source document" to prefill a new instance of targetDtoType (a [KandraDocumentForm]-attributed Dto) via the View page's "Create {Type}" button, which navigates to the target's Add page passing this document's id as OnNewAsync's sourceDocumentId parameter. Repeatable: a source document may feed more than one target type (e.g. Invoice -> Waybill and Invoice -> ReturnNote).

Constructors

ConstructorDescription
SourceForAttribute(Type)Declares that this Document Dto can be used as the "source document" to prefill a new instance of targetDtoType (a [KandraDocumentForm]-attributed Dto) via the View page's "Create {Type}" button, which navigates to the target's Add page passing this document's id as OnNewAsync's sourceDocumentId parameter. Repeatable: a source document may feed more than one target type (e.g. Invoice -> Waybill and Invoice -> ReturnNote).

Properties

PropertyDescription
TargetDtoTypeThe target Dto type that can be prefilled from this source document.

Kandra.Attributes.ApplicationAction

The claim/action vocabulary used across the platform's authorization system — one member per kind of operation a caller can be granted or denied on an entity. Used as PermissionsFromAttribute's action parameter and by authorization checks generally.

Fields

FieldDescription
DeleteRemove a record.
ExecuteRun a non-CRUD operation (e.g. a Report or DataProcessor action) rather than reading or writing a record directly.
InsertCreate a new record.
UpdateModify an existing record.
ViewRead/list a record.

Kandra.Attributes.Constants.KandraConstantAttribute

Marks a class as a typed constant descriptor (derives from Constant<T>). Pure marker — discovery target for the constants registry generator, never reflected on at runtime.

Kandra.Attributes.Editors.AccountDialogAttribute

Marks a string? Dto property as an account-code selector, rendered as a modal tree picker over the chart of accounts (Kandra.ClientLib.MudBlazor's AccountDialogSelect). See [AccountSearch] for why this has no SourceType constructor argument and binds a Code string, not a Guid.

Properties

PropertyDescription
NodeSelectionWhat's selectable. Defaults to Leaves, matching every other hierarchical-style selector.

Kandra.Attributes.Editors.AccountSearchAttribute

Marks a string? Dto property as an account-code selector, rendered as an autocomplete searching the chart of accounts by code or name (Kandra.ClientLib.MudBlazor's AccountSearchSelect). Unlike [Dropdown]/[Search]/[Dialog], no SourceType constructor argument - there is exactly one chart of accounts per running configuration (Kandra.Domain.Accounting.IChartOfAccountsService.Chart), not a per-field choice of source Dto. The bound property holds the account's Code (e.g. "68" or "28.1"), not a Guid - AccountNode has no Guid Id.

Properties

PropertyDescription
NodeSelectionWhat's selectable. Defaults to Leaves, matching every other hierarchical-style selector.

Kandra.Attributes.Editors.DateEditorAttribute

Selects a date-only, time-only, or full date+time editor for a DateTime property.

Constructors

ConstructorDescription
DateEditorAttribute(DateEditorKind)Creates the attribute with the given editor kind.

Properties

PropertyDescription
KindWhich of date-only, time-only, or combined date+time this property renders as.

Kandra.Attributes.Editors.DateEditorKind

Which date/time editor UI a DateEditorAttribute-decorated property renders as.

Fields

FieldDescription
DateDate-only editor, no time component.
DateTimeCombined date and time editor. The default.
TimeTime-only editor, no date component.

Kandra.Attributes.Editors.DateRangeEditorAttribute

Selects the date-range editor (calendar with quick-range presets) for a DateRangeDto property.

Kandra.Attributes.Editors.DependsOnAttribute

Marks a selector property as dependent on another property (e.g. a warehouse selector filtered by company). When the named property changes, this property's selection list is re-filtered and its current selection cleared.

Constructors

ConstructorDescription
DependsOnAttribute(String)Creates the attribute naming the property this selector depends on.

Properties

PropertyDescription
PropertyNameThe name of the sibling property this selector depends on.

Kandra.Attributes.Editors.DialogAttribute

Full list view in a modal — filters, sorting, multi-column. References a *Dto source type only.

Constructors

ConstructorDescription
DialogAttribute(Type)Creates the attribute pointing at the source Dto type.

Properties

PropertyDescription
NodeSelectionHierarchical-only; no-op when SourceType is a flat dictionary.
RootFolderCodeHierarchical-only; scopes the selector to one folder's subtree. A string (the target folder's Code, the stable natural key), not a Guid - attribute constructor/named arguments must be compile-time constants, and Guid isn't a valid attribute-argument type.
SourceTypeThe *Dto type whose list is shown in the modal.

Kandra.Attributes.Editors.DropdownAttribute

Small fixed lists — loads all items, renders as a plain select. References a *Dto source type only, never an entity type.

Constructors

ConstructorDescription
DropdownAttribute(Type)Creates the attribute pointing at the source Dto type.

Properties

PropertyDescription
SourceTypeThe *Dto type whose full list is loaded into the select.

Kandra.Attributes.Editors.EditorAttribute

Base class for editor-selection attributes. No AttributeUsageAttribute of its own — each concrete subclass declares its own placement, matching the VisibleNameAttribute pattern.

Kandra.Attributes.Editors.EnumGuidDropdownAttribute

Renders like a plain enum select (compiled-in options, no server round-trip) but binds the selected member's Guid [SubcontoId] instead of the enum value itself. EnumType must be an enum whose members carry [SubcontoId] (Kandra.Attributes.Accounting).

Constructors

ConstructorDescription
EnumGuidDropdownAttribute(Type)Creates the attribute pointing at the backing enum type.

Properties

PropertyDescription
EnumTypeThe enum type whose members (each carrying [SubcontoId]) populate the select.

Kandra.Attributes.Editors.EnumGuidMultiSelectAttribute

Multi-value counterpart of EnumGuidDropdownAttribute — binds IReadOnlyList<Guid>?.

Constructors

ConstructorDescription
EnumGuidMultiSelectAttribute(Type)Creates the attribute pointing at the backing enum type.

Properties

PropertyDescription
EnumTypeThe enum type whose members (each carrying [SubcontoId]) populate the multi-select.

Kandra.Attributes.Editors.FilePickerAttribute

Single-file attachment control: pick one local file (not uploaded until the form saves), or - for an existing value - a resolved download link with a Clear/replace option when the form isn't read-only. Placed on a nullable Guid property (the blob reference id); no constructor args, unlike Dropdown/ Search/Dialog - a file field doesn't reference another Dto.

Properties

PropertyDescription
Extensionsundocumented

Kandra.Attributes.Editors.HandlerTarget

Which object a handler's HandleAsync should be invoked with, relative to where the HandlerTriggerAttribute is declared. Only meaningful once a property/class sits inside a tabular-section line Dto (e.g. WaybillLineDto) vs. a top-level Document/Dictionary/Report/ DataProcessor Dto — for a top-level Dto there's no "line" to target at all.

Fields

FieldDescription
BothInvoke the handler against both the line and the document — only valid on a line Dto's property/class, for a handler with overloads that make sense against both.
DefaultContext-dependent: on a top-level Dto this is Document; on a line Dto this is Line. The right choice for the common case — a handler acting on whatever object the attribute is actually declared on.
DocumentTarget the top-level document/dictionary/report/data-processor Dto. On a top-level Dto this is identical to Default. On a line Dto's property, this bubbles up to the line component's own Document parameter instead of the line itself — e.g. a line's Quantity changing can trigger a document-level total recompute directly, without waiting for a class-level trigger on the document itself.
LineTarget the line the attribute is declared on. Only valid on a line Dto's property/class — declaring this on a top-level Dto is an error, there's no line to target.

Kandra.Attributes.Editors.HandlerTriggerAttribute

Declares that a property's change (or, at class level, a document-wide action like Save) is bound to a handler — either a UI-only Kandra.Forms.Handlers.ILocalHandler, or a server-round-trip Kandra.Forms.Handlers.IHandler<TIn,TOut> (e.g. a price lookup) — referenced directly by HandlerType, not by a string name, so a rename/refactor of the handler class keeps this reference correct automatically (same "reference the type, not a string" convention PermissionsFromAttribute/DropdownAttribute/KandraHandlerBehaviorAttribute already use elsewhere in this vocabulary). Consumed by Kandra.Generators.Ui.Blazor: for a generated form, OnChange becomes an onChanged callback on the field's editor, OnSave (class level, Document forms) an override of the page's save call, and OnLineRemove (on a Lines property) an onLineRemoved callback - the call to emit is resolved from the handler's own HandleAsync overloads, with Target as an explicit override. OnClick has no generator consumer yet; a hand-written page still calls the handler's HandleAsync itself.

Constructors

ConstructorDescription
HandlerTriggerAttribute(Type, HandlerTriggerEvent, HandlerTarget)Creates the attribute binding a handler to a trigger event.

Properties

PropertyDescription
EventThe UI event that invokes the handler.
HandlerTypeThe local or server handler type this trigger invokes.
TargetWhich object (line, document, or both) the handler is invoked against.

Kandra.Attributes.Editors.HandlerTriggerEvent

The UI event that should invoke the referenced handler.

Fields

FieldDescription
OnChangeA field's value changed.
OnClickAn explicit button/action click, unrelated to saving.
OnLineRemoveA line was removed from a tabular section. Only meaningful on a Lines-shaped collection property.
OnSaveAbout to persist the document/dictionary/report/data-processor (before the CRUD call).

Kandra.Attributes.Editors.HierarchicalNodeSelection

What a hierarchical dictionary selector should let the user pick, for a future Dto-driven UI generator to read off [Search]/[Dialog]'s NodeSelection property. Declared-only, unconsumed by any generator today - same status as the rest of the Editors family. Deliberately not shared with Kandra.ClientLib.MudBlazor.Shared.Components.Selectors' own runtime enum of the same name/shape: this one is compile-time metadata read by attributes only, that one is a Razor component parameter, and the two planes don't reference each other.

Fields

FieldDescription
AnyBoth leaves and folders are selectable.
FoldersOnly folders are selectable.
LeavesOnly leaves are selectable. The default.

Kandra.Attributes.Editors.MultiSelectAttribute

Multi-value selector for a collection-of-id property. References a *Dto source type only, never an entity type.

Constructors

ConstructorDescription
MultiSelectAttribute(Type)Creates the attribute pointing at the source Dto type.

Properties

PropertyDescription
SourceTypeThe *Dto type whose full list is loaded into the multi-select.

Kandra.Attributes.Editors.MultilineAttribute

Renders the property as a multi-row textarea instead of a single-line input.

Properties

PropertyDescription
RowsThe number of visible textarea rows. Defaults to 3.

Kandra.Attributes.Editors.PasswordEditorAttribute

Renders the property as a masked password input.

Kandra.Attributes.Editors.SearchAttribute

Large dictionaries — autocomplete with server-side filtering. References a *Dto source type only.

Constructors

ConstructorDescription
SearchAttribute(Type)Creates the attribute pointing at the source Dto type.

Properties

PropertyDescription
NodeSelectionHierarchical-only; no-op when SourceType is a flat dictionary.
RootFolderCodeHierarchical-only; scopes the selector to one folder's subtree. A string (the target folder's Code, the stable natural key), not a Guid - attribute constructor/named arguments must be compile-time constants, and Guid isn't a valid attribute-argument type.
SourceTypeThe *Dto type this autocomplete's server-side filtering searches over.

Kandra.Attributes.Editors.SelectorFilterAttribute

Declares a static filter (field, operator, value) a selector property's lookup should apply on top of whatever the user types/picks - e.g. "only Active items". Layered onto a [Dropdown]/[Search]/[Dialog]-attributed property, not an alternate editor kind, so this doesn't derive from EditorAttribute - same convention as [DependsOn]. Multiple instances are AND-combined, mirroring Kandra.Forms.Querying.PagedQueryDto.Filters. Declared-only, unconsumed by any generator today - same status as the rest of the Editors family.

Constructors

ConstructorDescription
SelectorFilterAttribute(String, String, String)Creates the attribute declaring a static filter clause.

Properties

PropertyDescription
FieldThe name of the field to filter on.
OperatorOne of the operator strings Kandra.Application.Queryable.FilterBy dispatches on (e.g. "contains", "equals") - not an enum here since Kandra.Attributes stays reference-free of that server-only project.
ValueThe fixed value to compare against, or null when the operator needs none.

Kandra.Attributes.Editors.SelectorSortAttribute

Declares a static sort a selector property's lookup should apply on top of whatever the user types/picks. Layered onto a [Dropdown]/[Search]/[Dialog]-attributed property, not an alternate editor kind, so this doesn't derive from EditorAttribute - same convention as [DependsOn]. Multiple instances apply in declaration order (first = primary sort key), mirroring Kandra.Forms.Querying.PagedQueryDto.Sort. Declared-only, unconsumed by any generator today - same status as the rest of the Editors family.

Constructors

ConstructorDescription
SelectorSortAttribute(String, Boolean)Creates the attribute declaring a static sort clause.

Properties

PropertyDescription
DescTrue for descending order; false (the default) for ascending.
FieldThe name of the field to sort by.

Kandra.Attributes.Editors.SubcontoEditorAttribute

Marks a Guid? Dto property as one subconto (analytical dimension) slot of a document's account/subconto composite editor. accountPropertyName names the sibling string? property carrying [AccountSearch]/[AccountDialog] whose chosen account determines this slot's allowed TypeId(s) at render time; slotIndex (0-4) is this property's position within that account's AccountLeafBase.SubcontoSlots order. Every property referencing the same account property is grouped into one generated AddAccountSubcontoEditor call instead of being rendered as an independent field - see Kandra.Generators.Ui.Blazor.DocumentUiEmitter. Slot indices within one group must be unique and contiguous starting at 0.

Constructors

ConstructorDescription
SubcontoEditorAttribute(String, Int32)Creates the attribute grouping this property into an account's subconto editor.

Properties

PropertyDescription
AccountPropertyNameThe name of the sibling string? property carrying [AccountSearch]/[AccountDialog] whose chosen account determines this slot's allowed TypeId(s).
SlotIndexThis property's position (0-4) within the account's AccountLeafBase.SubcontoSlots order.

Kandra.Attributes.Editors.SubcontoMultiSelectEditorAttribute

Multi-value counterpart of SubcontoEditorAttribute - marks an IReadOnlyList<Guid>? Dto property as one subconto slot of a report-style account/subconto multi-select composite (e.g. a report filter). Same grouping-by-account-property contract as SubcontoEditorAttribute; see its doc comment for the shared semantics.

Constructors

ConstructorDescription
SubcontoMultiSelectEditorAttribute(String, Int32)Creates the attribute grouping this property into an account's subconto multi-select editor.

Properties

PropertyDescription
AccountPropertyNameThe name of the sibling string? property carrying [AccountSearch]/[AccountDialog] whose chosen account determines this slot's allowed TypeId(s).
SlotIndexThis property's position (0-4) within the account's AccountLeafBase.SubcontoSlots order.

Kandra.Attributes.Entities.DetailAttribute

Marks a register scalar property as a movement detail rather than a dimension — keeps it out of the balance key. Without this marker, every non-resource scalar property on a register is a dimension by default.

Kandra.Attributes.Entities.KandraDictionaryEntityAttribute

Marks a class as a dictionary entity (derives from DictionaryBase/HierarchicalDictionaryBase).

Kandra.Attributes.Entities.KandraDictionaryFolderAttribute

Marks the concrete subclass of a hierarchical dictionary's TPH root that represents a folder (container) node — e.g. CounterpartyFolder. Needed because neither the discriminator value nor which of the (exactly two) concrete subclasses is Folder vs Leaf can be derived from the abstract TPH root alone: IHierarchicalDictionaryBehavior<TEntity>'s closure only ever gives the root type, never the Folder/Leaf split. Exactly one other concrete, non-abstract subclass of the same [KandraDictionaryEntity] TPH root must exist and is treated as the leaf type — more or fewer than one is a generator error.

Kandra.Attributes.Entities.KandraDocumentEntityAttribute

Marks a class as a document entity (derives from DocumentBase).

Kandra.Attributes.Entities.KandraEntityAttribute

Base marker for persistence (Domain-layer) entity classes. Carries no Dto reference — the Dto side (KandraFormAttribute) is a fully independent fact, matching the existing project layering (Domain must not reference Forms and vice versa).

Properties

PropertyDescription
SkipGenerationOpts this entity out of one or more generators that would otherwise consume it.
TableNameOverrides the convention-derived table name when set.

Kandra.Attributes.Entities.KandraGeneratedEqualityAttribute

Opts a partial class into generated Equals/GetHashCode/ToString (and, when the class also implements IRegisterDimensions<TSelf>, BuildEqualityPredicate) over every instance property the class itself declares (not inherited ones) — see docs/kandra-register-engine-design.md §1.1's narrowed exception. The class must be declared partial; every property and all business behavior stay 100% hand-written in the same file.

Kandra.Attributes.Entities.KandraMaxLengthOverrideAttribute

Overrides the standard [MaxLength] length declared on an inherited property, for the one entity that needs a different value than its base class's convention default — e.g. Currency needs Code capped at 3 chars while DictionaryBase.Code's own [MaxLength(64)] is the convention default for every other dictionary. A plain property-level [MaxLength] on the shared base can't express a per-subclass override, so this is class-level with a mandatory property name instead.

Constructors

ConstructorDescription
KandraMaxLengthOverrideAttribute(String, Int32)Overrides the standard [MaxLength] length declared on an inherited property, for the one entity that needs a different value than its base class's convention default — e.g. Currency needs Code capped at 3 chars while DictionaryBase.Code's own [MaxLength(64)] is the convention default for every other dictionary. A plain property-level [MaxLength] on the shared base can't express a per-subclass override, so this is class-level with a mandatory property name instead.

Properties

PropertyDescription
LengthThe overridden maximum length to enforce for PropertyName on this class.
PropertyNameThe name of the inherited property whose declared [MaxLength] this override replaces.

Kandra.Attributes.Entities.KandraRegisterEntityAttribute

Marks a class as a register (Movement/Balance/InfoRecord family). Marker only for now — the register family already expresses dimensions/resources through the C# type system; a deeper register-attribute design is future work.

Kandra.Attributes.Entities.KandraTablePartAttribute

Marks a document's row-collection property as a "table part" (1C terminology for a document's line/detail child table) — e.g. GoodsReceipt.Lines. Drives both the EfConfigGenerator (table name for the line entity's own IEntityTypeConfiguration<T>, found via the property's element type) and a generator that fills in RowNavigations/RemoveOrphans on the document's partial class from every [KandraTablePart]-marked property it declares.

Kandra.Attributes.Entities.ReferenceOfAttribute

Constructors

ConstructorDescription
ReferenceOfAttributeDynamic-mode constructor - set TypeIdProperty/PossibleTypes via object initializer.
ReferenceOfAttribute(Type)Static-mode constructor - the target type is fixed and known at compile time.

Properties

PropertyDescription
PossibleTypesDynamic-mode only: the closed set of candidate CLR types (Dictionary and/or Document) this field can ever resolve to.
TypeStatic-mode target type - the fixed Domain entity type this property is a foreign key into, or null in dynamic mode.
TypeIdPropertyDynamic-mode only: the name of the sibling row property that holds the target's runtime TypeId.

Kandra.Attributes.Entities.RegisterHiddenAttribute

Excludes a register Dimensions/Resources/Details scalar property from the generated register-transactions viewer's column list, without removing the underlying stored column — e.g. an internal type discriminator that another property's [ReferenceOf(TypeIdProperty = ...)] resolves against but that shouldn't itself be shown as a raw Guid.

Kandra.Attributes.Entities.TypeIdAttribute

Marks a CLR type (Dictionary/Document Dto or a subconto-backing enum) with its canonical, per-type Guid identity - the same value Domain-side entities carry via IEntityWithTypeId. Generic name because it is a reusable shape, not tied to any one entity kind.

Constructors

ConstructorDescription
TypeIdAttribute(String)undocumented

Properties

PropertyDescription
TypeIdThe type's canonical, permanent identity, parsed from the constructor's typeId string.

Kandra.Attributes.Layout.AggregateAttribute

Declares a report grid column's group-footer aggregate. Typically appears alongside [ReportViewColumn] on the same property. Currently unconsumed by any generator (Report UI generation doesn't exist yet - see docs/kandra-gaps-tracking.md), matching every other Layout attribute's design-time-only status until a renderer exists.

Properties

PropertyDescription
CustomAggregateTypeMust implement Kandra.Forms.Reports.ICustomAggregate. When set, always wins over Kind (emitted as MudBlazor's AggregateType.Custom). Not compile-time constrained here - Kandra.Attributes has zero ProjectReferences by design (same precedent as SupportedPrintFormAttribute.PrintFormType) - a mismatched type fails to compile at the generated call site instead.
KindThe built-in aggregate function applied in the group footer. Ignored when CustomAggregateType is set.

Kandra.Attributes.Layout.AggregateKind

Built-in report grid group-footer aggregate kinds, mirroring MudBlazor's own AggregateType enum minus Custom (Custom is implicit here - set AggregateAttribute.CustomAggregateType instead of a Kind member).

Fields

FieldDescription
AvgAverages the group's values.
CountCounts the group's rows.
MaxTakes the group's maximum value.
MinTakes the group's minimum value.
SumSums the group's values.

Kandra.Attributes.Layout.CalculatedAttribute

Marks a property as computed rather than user-entered.

Kandra.Attributes.Layout.ExtendedFilterAttribute

Marks a filter Dto property as belonging to a collapsed "extended"/advanced filter section, shown below the regular filter fields and collapsed by default. Currently unconsumed by any generator (Report UI generation doesn't exist yet - see docs/kandra-gaps-tracking.md) - hand-written Report pages place the marked fields under their own collapsible panel directly, matching every other Layout attribute's design-time-only status until a renderer exists.

Kandra.Attributes.Layout.FormSectionAttribute

Optional class-level declaration fixing a section's order/existence/tab up front. Repeatable.

Constructors

ConstructorDescription
FormSectionAttribute(String, Boolean)undocumented

Properties

PropertyDescription
ColumnsHow many layout columns the section's fields are arranged into.
KeyThe section's identity, matched against a property's Key.
OrderThe section's position among its tab's sections, ascending.
TabKeyThe owning tab's Key; omit for the implicit default tab.

Kandra.Attributes.Layout.FormTabAttribute

Optional class-level declaration fixing a tab's order/existence up front. Repeatable. A property's TabRefAttribute key matches one of these by Key. Entirely optional for the common single-tab form.

Constructors

ConstructorDescription
FormTabAttribute(String, Boolean)undocumented

Properties

PropertyDescription
KeyThe tab's identity, matched against a property's Key.
OrderThe tab's position among the form's tabs, ascending.

Kandra.Attributes.Layout.GridColumnAttribute

Grid-column metadata for a Dto property: visibility, sortability, filterability, order, width. Attribute named arguments cannot be nullable value types, so these default to the permissive engine default (visible/sortable/filterable) rather than a tri-state "not set" — set explicitly only to override.

Properties

PropertyDescription
FilterableWhether the grid can be filtered by this column.
OrderThe column's position among the grid's columns, ascending.
SortableWhether the grid can be sorted by this column.
VisibleWhether the column is rendered at all.
WidthPercentThe column's width as a percentage of the grid's total width; 0 lets the renderer size it automatically.

Kandra.Attributes.Layout.HideLabelAttribute

Suppresses the field label in generated UI.

Kandra.Attributes.Layout.ListFormColumnAttribute

Marks a property as visible as a column in the top-level list/grid page for an entity — distinct from GridColumnAttribute, which governs an embedded line-item grid inside a form.

Properties

PropertyDescription
FilterableWhether the list can be filtered by this column.
SortableWhether the list can be sorted by this column.

Kandra.Attributes.Layout.NotEditableAttribute

Marks a class/property non-editable in generated UI. Named "NotEditable", not "ReadOnly" — the latter would collide with ReadOnlyAttribute.

Kandra.Attributes.Layout.ReportSortDirection

The default sort direction for a ReportViewColumnAttribute-decorated report result column.

Fields

FieldDescription
AscendingSorted ascending by default.
DescendingSorted descending by default.
NoneColumn isn't sorted by default.

Kandra.Attributes.Layout.ReportViewColumnAttribute

Marks a report line property as a visible column of its results grid and declares its default sort/filter/group capabilities. Currently unconsumed by any generator (Report UI generation doesn't exist yet — see docs/kandra-gaps-tracking.md) — hand-written Report pages set matching column options directly, matching every other Layout attribute's design-time-only status until a renderer exists.

Properties

PropertyDescription
DefaultGroupOrder1, 2, 3… = this column's position in the default multi-level grouping; 0 = not grouped by default. Not nullable — attribute arguments can't be Nullable — so 0 is the "absent" sentinel.
DefaultSortThe column's default sort direction when the results grid first renders.
FilterableWhether the results grid can be filtered by this column.
GroupableWhether the results grid can be grouped by this column.
SortableWhether the results grid can be sorted by this column.

Kandra.Attributes.Layout.ReportViewGridAttribute

Marks a report result's line-collection property (e.g. Lines) as the source of its results grid. Currently unconsumed by any generator (Report UI generation doesn't exist yet — see docs/kandra-gaps-tracking.md) — hand-written Report pages render the grid directly, matching every other Layout attribute's design-time-only status until a renderer exists.

Kandra.Attributes.Layout.SectionRefAttribute

Assigns a property to a section declared elsewhere on the class via FormSectionAttribute (matched by Key). Carries no caption/order/columns of its own — that metadata lives on the referenced FormSectionAttribute. Omitting this means the property uses the implicit default section of whichever tab it belongs to.

Constructors

ConstructorDescription
SectionRefAttribute(String)undocumented

Properties

PropertyDescription
KeyThe referenced Key.

Kandra.Attributes.Layout.TabRefAttribute

Assigns a property to a tab declared elsewhere on the class via FormTabAttribute (matched by Key). Carries no caption/order of its own — that metadata lives on the referenced FormTabAttribute. Omitting this on every property of a form means the whole form uses one implicit default tab — nothing needs to be declared for the common case.

Constructors

ConstructorDescription
TabRefAttribute(String)undocumented

Properties

PropertyDescription
KeyThe referenced Key.

Kandra.Attributes.Layout.VisibleAttribute

Conditional visibility — the named member (property/method) is evaluated at render time to decide visibility.

Constructors

ConstructorDescription
VisibleAttribute(String)undocumented

Properties

PropertyDescription
ConditionMemberThe name of the property or method evaluated at render time to decide visibility.

Kandra.Attributes.Naming.AddFormTitleAttribute

Whole-phrase caption for the generated "add new" window/page (e.g. "Create Branch").

Constructors

ConstructorDescription
AddFormTitleAttribute(String, Boolean)Sets the add-form title. See VisibleNameAttribute.

Kandra.Attributes.Naming.CaptionAttribute

Display label for a class or property. Named "Caption", not "DisplayName" — the latter would collide with DisplayNameAttribute.

Constructors

ConstructorDescription
CaptionAttribute(String, Boolean)Sets the display caption. See VisibleNameAttribute.

Kandra.Attributes.Naming.EditFormTitleAttribute

Whole-phrase caption for the generated edit window/page (e.g. "New invoice").

Constructors

ConstructorDescription
EditFormTitleAttribute(String, Boolean)Sets the edit-form title. See VisibleNameAttribute.

Kandra.Attributes.Naming.EnumCaptionAttribute

Display label for an enum member. Kept in root Naming (not Forms) — enum members live outside the Dto/forms world and are consumed anywhere an enum value is rendered, not just in forms.

Constructors

ConstructorDescription
EnumCaptionAttribute(String, Boolean)Sets the enum member's display label. See VisibleNameAttribute.

Kandra.Attributes.Naming.ExecuteFormTitleAttribute

Whole-phrase heading for a single-page filter-and-run screen (report or data-processor) — these have no add/edit/list/view distinction, just one page to execute against.

Constructors

ConstructorDescription
ExecuteFormTitleAttribute(String, Boolean)Sets the execute-form heading. See VisibleNameAttribute.

Kandra.Attributes.Naming.ListFormTitleAttribute

Whole-phrase caption for the generated list/grid window (e.g. "Invoices").

Constructors

ConstructorDescription
ListFormTitleAttribute(String, Boolean)Sets the list-form title. See VisibleNameAttribute.

Kandra.Attributes.Naming.NavigationNameAttribute

Menu navigation label for the entry that navigates to this form (e.g. "Branches" in the sidebar).

Constructors

ConstructorDescription
NavigationNameAttribute(String, Boolean)Sets the navigation menu label. See VisibleNameAttribute.

Kandra.Attributes.Naming.PluralNameAttribute

Plural display name for an entity (e.g. "Branches" for "Branch"). Whole phrase, never composed.

Constructors

ConstructorDescription
PluralNameAttribute(String, Boolean)Sets the plural display name. See VisibleNameAttribute.

Kandra.Attributes.Naming.RegisterCaptionAttribute

Display label for a register (Movement/DocumentInfoRecord class) in the register-transactions viewer. Applied to the register row class itself — the type EntityDiscovery already walks via [KandraRegisterEntity] — not the central BalanceRegister<>/TurnoverRegister<>/ DocumentInfoRegister<> subclass, which no generator discovers today.

Constructors

ConstructorDescription
RegisterCaptionAttribute(String, Boolean)Sets the register's display caption. See VisibleNameAttribute.

Kandra.Attributes.Naming.SubsystemAttribute

Groups an entity into a navigation subsystem/area for menu generation.

Constructors

ConstructorDescription
SubsystemAttribute(String, Boolean)Sets the subsystem/area name. See VisibleNameAttribute.

Kandra.Attributes.Naming.ViewFormTitleAttribute

Whole-phrase caption for the generated read-only view window/page (e.g. "View Branch").

Constructors

ConstructorDescription
ViewFormTitleAttribute(String, Boolean)Sets the view-form title. See VisibleNameAttribute.

Kandra.Attributes.Naming.VisibleNameAttribute

Base class for the display-name attribute family. Deliberately has no AttributeUsageAttribute of its own — each concrete subclass declares its own placement rules and multiplicity. Pure data container: resolution into a culture-specific string is a separate, later concern, not implemented by this attribute. No dedicated resolver service is planned — Value/IsLiteral is already directly usable with any IStringLocalizer (IsLiteral ? Value : localizer[Value]). No resource type is carried here — the platform's localization chain resolves a key across every registered resx module regardless of which type originally declared it, so "which type" was never a fact this attribute needed to know.

Constructors

ConstructorDescription
VisibleNameAttribute(String, Boolean)Stores the display value and its resolution mode for a concrete display-name attribute to expose.

Properties

PropertyDescription
IsLiteralWhen true, Value is used as-is as the display string instead of being resolved through the localization chain.
ValueA localization resource key by default, resolved through the platform's localization chain; when IsLiteral is true, this is instead the literal display string, used as-is.

Kandra.Attributes.OrderAttribute

Plain ordinal override for declaration-order sequencing. Shared between UI-form layout and printable-form layout — declaration order is the default in both, this overrides it when needed.

Kandra.Attributes.Printable.Aggregate

The aggregate function for a TotalsAttribute-decorated print-table line property, computing its totals/subtotal row.

Fields

FieldDescription
AvgAverage of the column's values.
CountCount of the column's values.
SumSum of the column's values.

Kandra.Attributes.Printable.ExportFormat

The set of export formats a print form supports, declared via SupportedExportFormatsAttribute. Combinable with bitwise OR.

Fields

FieldDescription
CsvComma-separated values export.
ExcelExcel workbook export.
HtmlHTML export.
PdfPDF export.
WordWord document export.
XmlXML export.

Kandra.Attributes.Printable.FixedSectionAttribute

A reserved rectangle at absolute mm coordinates, declared once on a [PrintForm] class and assigned to properties via PrintSectionRef(Key) — for legally-mandated layouts (architecture doc §2.10.2) where geometry is prescribed, not designed. Renders its member properties the same way a flow section does (one label/value line per field, in declaration order), just always anchored at (X, Y, Width, HeightMm) instead of continuing the page's flow cursor.

Constructors

ConstructorDescription
FixedSectionAttribute(String)Declares a fixed section identified by key.

Properties

PropertyDescription
HeightMmThe section's fixed height in millimeters.
KeyThe section's identifying key, referenced by properties via PrintSectionRefAttribute.
PositionWidthThe section's width in millimeters.
PositionXThe section's left edge, in millimeters from the page origin.
PositionYThe section's top edge, in millimeters from the page origin.
StyleKeyReferences a [PrintStyle(Key)] declared on the same class.

Kandra.Attributes.Printable.FormatAttribute

Culture-aware value format string for a print-form property (e.g. "d", "N2").

Constructors

ConstructorDescription
FormatAttribute(String)Declares the format string applied to a print-form property's value.

Properties

PropertyDescription
FormatStringThe .NET format string applied to the property's value (e.g. "d", "N2").

Kandra.Attributes.Printable.PageAttribute

Paper geometry for a print form.

Properties

PropertyDescription
MarginsMmTop, right, bottom, left margins in millimeters.
OrientationThe page orientation.
SizeThe physical page size.

Kandra.Attributes.Printable.PageOrientation

Page orientation for a PageAttribute-decorated print form.

Fields

FieldDescription
LandscapeWider than tall.
PortraitTaller than wide.

Kandra.Attributes.Printable.PageSize

Physical page size for a PageAttribute-decorated print form.

Fields

FieldDescription
A4ISO A4 (210 x 297 mm).
A5ISO A5 (148 x 210 mm).
LetterUS Letter (8.5 x 11 in).

Kandra.Attributes.Printable.PrintBorders

Which borders a PrintStyleAttribute applies. Combinable with bitwise OR.

Fields

FieldDescription
AllAll four borders.
BottomBottom border only.
LeftLeft border only.
NoneNo borders.
RightRight border only.
TopTop border only.

Kandra.Attributes.Printable.PrintColumnAttribute

Column width/style for a print-table line property. Widths inside one table must be homogeneous (all percent or all mm).

Properties

PropertyDescription
StyleKeyReferences a [PrintStyle(Key)] declared on the enclosing [PrintForm] class.
WidthMmThe column's fixed width in millimeters. Must be homogeneous with sibling columns' WidthPercent/mm choice.
WidthPercentThe column's width as a percentage of the table's width. Must be homogeneous with sibling columns' WidthMm/percent choice.

Kandra.Attributes.Printable.PrintFormAttribute

Marker for print-form generator discovery.

Kandra.Attributes.Printable.PrintSectionAttribute

A flow section box, declared once on a [PrintForm] class and assigned to properties via PrintSectionRef(Key). Properties referencing it lay out as an n-column label/value grid, rendered in declaration order. PositionX/Y/Width default to (0,0,0), meaning "continue the normal flow"; setting them anchors the section at that page position instead.

Constructors

ConstructorDescription
PrintSectionAttribute(String)Declares a flow section identified by key.

Properties

PropertyDescription
ColumnsThe number of label/value columns the section's fields lay out into.
KeyThe section's identifying key, referenced by properties via PrintSectionRefAttribute.
PositionWidthThe section's width in millimeters. Zero (the default) means "continue the normal flow" instead of anchoring.
PositionXThe section's left edge, in millimeters from the page origin. Zero (the default) means "continue the normal flow" instead of anchoring.
PositionYThe section's top edge, in millimeters from the page origin. Zero (the default) means "continue the normal flow" instead of anchoring.
StyleKeyReferences a [PrintStyle(Key)] declared on the same class.

Kandra.Attributes.Printable.PrintSectionRefAttribute

Assigns a scalar property to a section (flow or fixed) by key — same shape as Kandra.Attributes.Layout.TabRefAttribute. Carries no style/position of its own: the referenced [PrintSection]/[FixedSection] supplies both, uniformly, for every field placed in it.

Constructors

ConstructorDescription
PrintSectionRefAttribute(String)Assigns the decorated property to the section identified by key.

Properties

PropertyDescription
KeyThe key of the [PrintSection]/[FixedSection] this property is assigned to.

Kandra.Attributes.Printable.PrintStyleAttribute

A named, reusable style — declared once on a [PrintForm] class and referenced by Key from [PrintSection]/[FixedSection]/[PrintColumn]'s own StyleKey property. Not stacked directly onto a property: style applies at the section or column level, uniformly to everything placed in it.

Constructors

ConstructorDescription
PrintStyleAttribute(String)Declares a named style identified by key.

Properties

PropertyDescription
AlignThe text alignment applied by this style.
BackgroundColorHex fill color.
BoldWhether text renders bold.
BordersWhich borders this style applies.
ColorHex text color, e.g. "#333333".
FontSizeThe font size applied by this style.
ItalicWhether text renders italic.
KeyThe style's identifying key, referenced from a section/column's own StyleKey property.

Kandra.Attributes.Printable.PrintTableAttribute

Marks a List<TLine> property as a tabular part (paginating band).

Kandra.Attributes.Printable.PrintTitleAttribute

Localized document title for a [PrintForm] class (resource key by default, §2.1.4.2).

Constructors

ConstructorDescription
PrintTitleAttribute(String, Boolean)Declares the print form's localized document title.

Kandra.Attributes.Printable.SupportedExportFormatsAttribute

Declares which export formats a print form supports.

Constructors

ConstructorDescription
SupportedExportFormatsAttribute(ExportFormat)Declares which export formats the decorated print form supports.

Properties

PropertyDescription
FormatsThe export formats the decorated print form supports.

Kandra.Attributes.Printable.SupportedLayoutTagAttribute

Declares one selectable print layout for a report/document form. "Key" is what a client sends back as ReportExportRequest.LayoutTag / DocumentExportRequest.LayoutTag; the inherited Value is its display name.

Constructors

ConstructorDescription
SupportedLayoutTagAttribute(String, String, Boolean)Declares one selectable print layout identified by key.

Properties

PropertyDescription
KeyWhat a client sends back as ReportExportRequest.LayoutTag / DocumentExportRequest.LayoutTag to select this layout.

Kandra.Attributes.Printable.SupportedPrintFormAttribute

Links a reportform/documentform class to a [PrintForm] class that renders it.

Constructors

ConstructorDescription
SupportedPrintFormAttribute(Type)Links the decorated reportform/documentform class to the print form that renders it.

Properties

PropertyDescription
PrintFormTypeThe [PrintForm]-decorated class that renders this reportform/documentform.

Kandra.Attributes.Printable.TextAlign

Text alignment for a PrintStyleAttribute.

Fields

FieldDescription
CenterCentered.
LeftAligned to the left edge.
RightAligned to the right edge.

Kandra.Attributes.Printable.TotalsAttribute

Marks a print-table line property for a totals row; the runtime also emits per-page carry-over subtotals.

Constructors

ConstructorDescription
TotalsAttribute(Aggregate)Marks the decorated property for a totals row using aggregate.

Properties

PropertyDescription
AggregateThe aggregate function computed for the decorated property's totals/subtotal row.

Kandra.Attributes.SkipGeneration

Opts a Kandra*Entity/Kandra*Form-attributed class out of one or more generators, so a developer can replace that piece with hand-written code for an edge case the generator doesn't handle. Read by EntityDiscovery (off SkipGeneration) and FormDiscovery (off SkipGeneration) into EntityModel.Skip/FormModel.Skip, then checked by each generator's own emission loop before it emits anything for that model.

Fields

FieldDescription
AllSkips every generator listed above.
ClientLibSkips Kandra.Generators.ClientLib — no Refit client/service-wrapper DI registration is emitted.
ControllerSkips Kandra.Generators.Api — no CRUD controller is emitted.
DiApplicationSkips Kandra.Generators.Di.Application — no Application-layer DI registration block is emitted.
DiPersistenceSkips Kandra.Generators.Di.Persistence — no Persistence-layer DI registration block is emitted.
EfConfigSkips Kandra.Generators.EfConfig — no IEntityTypeConfiguration<T> is emitted.
NoneSkips no generator; the entity/form participates in every generator normally.
UiFormSkips the UI generator — no generated Blazor form/page is emitted.