Update ToonTests to serialize type metadata only
Replaced AcToonSerializer.Serialize with SerializeTypeMetadata<FullProcessModel> in ToonTests. The test now serializes only the type metadata for FullProcessModel using the domain description, rather than serializing the actual data instance. Assertions and comments remain unchanged.
This commit is contained in:
parent
56475da43b
commit
85dbb853c7
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Grids
|
||||||
|
|
||||||
|
Grid component integration tests for `MgGridBase` layout persistence, column rendering, and URL link functionality.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`TestMgGrid.cs`** -- Test infrastructure for grid testing:
|
||||||
|
- `TestGridOrderItemDataSource` -- DataSource with the 3-parameter constructor required by `MgGridBase.OnInitializedAsync` via `Activator.CreateInstance`.
|
||||||
|
- `DynamicColumnAddingEventArgs` -- Event args for customizing dynamically added columns.
|
||||||
|
- `TestMgGridBase<...>` -- Abstract generic test grid that overrides layout persistence with in-memory `Dictionary` storage and auto-builds columns from `TDataItem` properties via reflection.
|
||||||
|
- `TestMgGridOrderItem` -- Concrete test grid bound to `TestOrderItem` entities.
|
||||||
|
- **`MgGridBaseTests.cs`** -- `[TestClass]` with tests for:
|
||||||
|
- Column width persistence across grid re-renders.
|
||||||
|
- Layout storage population after render.
|
||||||
|
- Separate layout keys for differently named grids.
|
||||||
|
- Master grid detection.
|
||||||
|
- Reflection-based column building (verifies Id, ProductName, Quantity columns).
|
||||||
|
- `MgGridDataColumn.UrlLink` rendering with token replacement.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
# AyCode.Blazor.Components.Tests
|
||||||
|
|
||||||
|
bUnit + MSTest component test project targeting net10.0. Tests Blazor component behavior including grid layout persistence and column rendering.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`MSTestSettings.cs`** -- Assembly-level config enabling method-level test parallelization.
|
||||||
|
- **`BunitTestContext.cs`** -- Abstract base classes (`BunitTestContext`, `TestContextWrapper`) that wire up bUnit `BunitContext` creation and disposal to MSTest `[TestInitialize]`/`[TestCleanup]` lifecycle.
|
||||||
|
- **`Grids/`** -- Grid component integration tests (see [Grids/README.md](Grids/README.md)).
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Dependency | Version | Type |
|
||||||
|
|---|---|---|
|
||||||
|
| bunit | 2.4.2 | NuGet |
|
||||||
|
| MSTest | 4.0.2 | NuGet |
|
||||||
|
| AyCode.Blazor.Components | -- | ProjectReference |
|
||||||
|
| AyCode.Services.Server.Tests | -- | ProjectReference |
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
# CardViews
|
||||||
|
|
||||||
|
Generic card-based view component that renders items in a responsive CSS Grid layout with optional pagination, filtering, and scroll-to-item support.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`MgCardView.razor.cs`** -- `MgCardView<TItem>` component. Accepts `Data`, `CardTemplate`, responsive column counts (`ColumnCountXs/Sm/Lg`), optional pager (`ShowPager`, `PageSize` default 12), optional filter panel, container height, and `ScrollToItem` with JS interop for auto-scrolling. Fires `OnCardClick` when a card is tapped.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Grids
|
||||||
|
|
||||||
|
Core grid system built on DevExpress `DxGrid` with SignalR-based data binding, CRUD operations, layout persistence, fullscreen mode, and an info panel for row details.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`MgGridBase.cs`** -- `MgGridBase<TSignalRDataSource, TDataItem, TId, TLoggerClient>`, the main abstract grid component. Extends `DxGrid` and binds to an `AcSignalRDataSource` for real-time CRUD via SignalR message tags. Supports master-detail hierarchy (`ParentGrid`, `GetRootGrid`), row navigation, edit state tracking, layout auto-save/load/reset via localStorage, and fullscreen toggle.
|
||||||
|
- **`MgGridSignalRDataSource.cs`** -- `MgGridSignalRDataSource<TDataItem, TId>`, a `GridCustomDataSource` that wraps `AcSignalRDataSource`. Returns local data instantly for previously-seen filter criteria while refreshing from the server in the background. Handles filter, sort, paging, unique values, and summary calculations locally.
|
||||||
|
- **`MgGridDataColumn.cs`** -- Extends `DxGridDataColumn` with InfoPanel visibility/order parameters and a `UrlLink` template that renders cells as hyperlinks with `{Property}` placeholder substitution via compiled accessors.
|
||||||
|
- **`MgGridInfoPanel.razor.cs`** -- `MgGridInfoPanel` component implementing `IInfoPanelBase`. Displays focused-row details with responsive column layout, edit/view mode, sticky positioning via JS interop, and cached column/display-text lookups.
|
||||||
|
- **`MgGridToolbarBase.cs`** -- Extends `DxToolbar` with `Grid`, `RefreshClick`, and `ShowOnlyIcon` parameters.
|
||||||
|
- **`GridEditMode.cs`** -- `MgGridEditState` enum: `None`, `New`, `Edit`.
|
||||||
|
- **`MgGridHelper.cs`** -- Placeholder helper (empty).
|
||||||
|
- **`MgGridToolbarHelper.cs`** -- Placeholder helper (empty).
|
||||||
|
- **`MgGridInfoPanelHelper.cs`** -- Placeholder helper (empty).
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Components
|
||||||
|
|
||||||
|
DevExpress component wrappers and grid infrastructure for the AyCode Blazor component library. Each `Ac*` class extends a DevExpress Blazor control to allow project-wide customization from a single point.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`AcComponentBase.cs`** -- Abstract base class extending `DxComponentBase`.
|
||||||
|
- **`AcButton.cs`** -- Extends `DxButton`.
|
||||||
|
- **`AcTextBox.cs`** -- Extends `DxTextBox`.
|
||||||
|
- **`AcComboBox.cs`** -- Generic wrapper for `DxComboBox<TData, TValue>`.
|
||||||
|
- **`AcDxDateEdit.cs`** -- Generic wrapper for `DxDateEdit<T>`.
|
||||||
|
- **`AcFormLayoutItem.cs`** -- Extends `DxFormLayoutItem`.
|
||||||
|
- **`AcMaskedInput.cs`** -- Generic wrapper for `DxMaskedInput<T>`.
|
||||||
|
- **`AcMemo.cs`** -- Extends `DxMemo`.
|
||||||
|
- **`AcSpinEdit.cs`** -- Generic wrapper for `DxSpinEdit<T>`.
|
||||||
|
- **`MgComponentsHelper.cs`** -- Placeholder helper class (currently empty).
|
||||||
|
|
||||||
|
## Subfolders
|
||||||
|
|
||||||
|
- **`CardViews/`** -- Generic card-based view component with pagination.
|
||||||
|
- **`Grids/`** -- Core grid system with SignalR data binding, toolbar, info panel, and layout persistence.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# AyCode.Blazor.Components
|
||||||
|
|
||||||
|
Blazor Razor component library targeting .NET 10. Provides reusable DevExpress-based UI components, a SignalR-powered grid system, and LINQ expression serialization services.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- **DevExpress.Blazor** 25.1.3, **DevExpress.Data** 25.1.3
|
||||||
|
- **Microsoft.AspNetCore.SignalR.Client** 9.0.11, **MessagePack** 3.1.4
|
||||||
|
- **Project refs:** AyCode.Blazor.Models, AyCode.Blazor.Models.Server
|
||||||
|
- **DLL refs:** AyCode.Core, AyCode.Entities, AyCode.Interfaces, AyCode.Models, AyCode.Services, AyCode.Services.Server, AyCode.Utils
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`ExampleJsInterop.cs`** -- Scoped JS interop service that lazy-loads a JS module and exposes a `Prompt` method.
|
||||||
|
|
||||||
|
## Subfolders
|
||||||
|
|
||||||
|
- **`Components/`** -- DevExpress component wrappers and grid infrastructure.
|
||||||
|
- **`Services/`** -- Authentication, grid data source, and LINQ expression serialization helpers.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# ExpressionHelpers
|
||||||
|
|
||||||
|
LINQ expression tree serialization and deserialization to JSON, enabling expression transport over SignalR or HTTP. Converts `Expression` trees to a recursive `AcExpressionNode` DTO and back, supporting binary, unary, lambda, member access, method calls, conditionals, new/member-init, and array expressions.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`AcExpressionNode.cs`** -- Universal DTO representing any expression node. Includes `ParameterNode` and `MemberBindingNode` supporting types. Recursively models the full expression tree and is JSON-serializable.
|
||||||
|
- **`AcExpressionHelper.cs`** -- Static facade for serializing/deserializing expressions and `IQueryable` query trees. Provides `ExpressionToJson`, `ExpressionFromJson`, `QueryToJson`, and `ApplyQueryFromJson` methods.
|
||||||
|
- **`AcExpressionSerializerVisitor.cs`** -- `ExpressionVisitor` subclass that walks an expression tree and builds the `AcExpressionNode` graph using a stack-based approach. Handles closure variable evaluation and constant serialization.
|
||||||
|
- **`AcExpressionDeserializer.cs`** -- Reconstructs `Expression` trees from `AcExpressionNode` DTOs. Resolves types, parameters, methods, and member bindings. Handles nullable type mismatches in binary expressions.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Logins
|
||||||
|
|
||||||
|
Web authentication service for the Blazor application.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`AcWebAuthService.cs`** -- `AcWebAuthService` class with a virtual `Logout()` method. Intended as a base class for application-specific auth services to override with concrete logout logic.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Services
|
||||||
|
|
||||||
|
Application services including authentication, grid data source prototyping, and LINQ expression tree serialization for SignalR/HTTP transport.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`AcGridDataSource.cs`** -- Commented-out prototype of a `GridCustomDataSource` wrapping an `AcSignalRDataSource` with OData-style filtering. Not currently active; the working implementation lives in `Components/Grids/MgGridSignalRDataSource.cs`.
|
||||||
|
|
||||||
|
## Subfolders
|
||||||
|
|
||||||
|
- **`Logins/`** -- Web authentication service.
|
||||||
|
- **`ExpressionHelpers/`** -- LINQ expression tree serialization and deserialization to JSON for transport over SignalR or HTTP.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
# AyCode.Blazor.Controllers
|
||||||
|
|
||||||
|
Scaffolding project for Blazor controllers and logging infrastructure. Currently contains only a placeholder class with a reserved folder for future logger implementations.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`Class1.cs`** -- Empty placeholder class in the `AyCode.Blazor.Controllers` namespace.
|
||||||
|
|
||||||
|
## Reserved Folders
|
||||||
|
- **`Loggers/`** -- Future logger implementations.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Dependency | Version | Type |
|
||||||
|
|---|---|---|
|
||||||
|
| AyCode.Blazor.Models | -- | ProjectReference |
|
||||||
|
| AyCode.Blazor.Models.Server | -- | ProjectReference |
|
||||||
|
| MessagePack | 3.1.4 | NuGet |
|
||||||
|
| Microsoft.AspNetCore.SignalR.Client | 9.0.11 | NuGet |
|
||||||
|
| Microsoft.AspNetCore.SignalR.Common | 9.0.11 | NuGet |
|
||||||
|
| AyCode.Core, .Core.Server, .Database, .Entities, .Entities.Server, .Interfaces, .Interfaces.Server, .Models, .Models.Server, .Services, .Services.Server, .Utils | -- | DLL references |
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
# AyCode.Blazor.Models.Server
|
||||||
|
|
||||||
|
Scaffolding project for server-side Blazor models and services. Currently contains only a placeholder class with reserved folders for future implementation.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`Class1.cs`** -- Empty placeholder class in the `AyCode.Blazor.Models.Server` namespace.
|
||||||
|
|
||||||
|
## Reserved Folders
|
||||||
|
- **`Models/`** -- Future server-side model definitions.
|
||||||
|
- **`Services/`** -- Future server-side service implementations.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Dependency | Type |
|
||||||
|
|---|---|
|
||||||
|
| AyCode.Core | DLL reference |
|
||||||
|
| AyCode.Core.Server | DLL reference |
|
||||||
|
| AyCode.Database | DLL reference |
|
||||||
|
| AyCode.Entities | DLL reference |
|
||||||
|
| AyCode.Entities.Server | DLL reference |
|
||||||
|
| AyCode.Interfaces | DLL reference |
|
||||||
|
| AyCode.Interfaces.Server | DLL reference |
|
||||||
|
| AyCode.Models.Server | DLL reference |
|
||||||
|
| AyCode.Services | DLL reference |
|
||||||
|
| AyCode.Services.Server | DLL reference |
|
||||||
|
| AyCode.Utils | DLL reference |
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
# AyCode.Blazor.Models
|
||||||
|
|
||||||
|
.NET 10 class library with AOT compilation (`RunAOTCompilation` + `WasmStripILAfterAOT`) providing view model base classes and shared models for the AyCode Blazor UI layer.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`Class1.cs`** -- Empty placeholder class in the root namespace.
|
||||||
|
- **`ViewModels/`** -- Abstract view model base classes (see [ViewModels/README.md](ViewModels/README.md)).
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
All referenced as pre-built DLLs from `AyCode.Core\AyCode.Services.Server\bin\`:
|
||||||
|
|
||||||
|
| Assembly | Type |
|
||||||
|
|---|---|
|
||||||
|
| AyCode.Core | DLL reference |
|
||||||
|
| AyCode.Core.Server | DLL reference |
|
||||||
|
| AyCode.Entities | DLL reference |
|
||||||
|
| AyCode.Entities.Server | DLL reference |
|
||||||
|
| AyCode.Interfaces | DLL reference |
|
||||||
|
| AyCode.Interfaces.Server | DLL reference |
|
||||||
|
| AyCode.Models | DLL reference |
|
||||||
|
| AyCode.Models.Server | DLL reference |
|
||||||
|
| AyCode.Services | DLL reference |
|
||||||
|
| AyCode.Services.Server | DLL reference |
|
||||||
|
| AyCode.Utils | DLL reference |
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
# ViewModels
|
||||||
|
|
||||||
|
Abstract view model base classes for the AyCode Blazor UI. All classes are abstract and currently contain no members, serving as the foundation for concrete view models in downstream projects.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- **`AcViewModelBase.cs`** -- Root abstract base class for all view models.
|
||||||
|
- **`AcDomainViewModel.cs`** -- Abstract base for domain-level view models (standalone, does not extend `AcViewModelBase`).
|
||||||
|
- **`AcGridViewModelBase.cs`** -- Abstract base for grid/table view models; extends `AcViewModelBase`.
|
||||||
|
- **`AcPageViewModelBase.cs`** -- Abstract base for page-level view models; extends `AcViewModelBase`.
|
||||||
|
- **`AcSiteViewModel.cs`** -- Abstract base for site-wide view models; extends `AcDomainViewModel`.
|
||||||
|
|
||||||
|
## Inheritance
|
||||||
|
|
||||||
|
```
|
||||||
|
AcViewModelBase
|
||||||
|
+-- AcGridViewModelBase
|
||||||
|
+-- AcPageViewModelBase
|
||||||
|
|
||||||
|
AcDomainViewModel
|
||||||
|
+-- AcSiteViewModel
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Platforms
|
||||||
|
|
||||||
|
Platform-specific code for AyCode.Maui.Core. Each subfolder is conditionally compiled only for its target platform. All classes currently contain empty `PlatformClass1` placeholders.
|
||||||
|
|
||||||
|
## Subfolders
|
||||||
|
- **`Android/`** -- Android-specific code (API 33+).
|
||||||
|
- **`iOS/`** -- iOS-specific code (15.0+).
|
||||||
|
- **`MacCatalyst/`** -- Mac Catalyst-specific code (15.0+).
|
||||||
|
- **`Windows/`** -- Windows-specific code (10.0.19041+).
|
||||||
|
- **`Tizen/`** -- Tizen-specific code (currently commented out in the .csproj).
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`{Platform}/PlatformClass1.cs`** -- Empty placeholder class per platform, all in the `AyCode.Maui.Core` namespace.
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
# AyCode.Maui.Core
|
||||||
|
|
||||||
|
.NET MAUI class library targeting Android (API 33+), iOS (15.0+), and Windows (10.0.19041+). Provides cross-platform shared code with per-platform specialization via the `Platforms/` folder.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
- **`Class1.cs`** -- Shared placeholder class included on all platforms.
|
||||||
|
- **`Platforms/`** -- Platform-specific code (see [Platforms/README.md](Platforms/README.md)).
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
| Dependency | Version | Type |
|
||||||
|
|---|---|---|
|
||||||
|
| Microsoft.Maui.Controls | 10.0.11 | NuGet |
|
||||||
|
| Microsoft.AspNetCore.Components.WebView.Maui | 10.0.11 | NuGet |
|
||||||
|
| Microsoft.AspNetCore.SignalR.Client | 9.0.11 | NuGet |
|
||||||
|
| Microsoft.AspNetCore.SignalR.Common | 9.0.11 | NuGet |
|
||||||
|
| MessagePack | 3.1.4 | NuGet |
|
||||||
|
| AyCode.Core, .Entities, .Interfaces, .Models, .Services, .Utils | -- | DLL references |
|
||||||
|
|
||||||
|
---
|
||||||
|
> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.
|
||||||
Loading…
Reference in New Issue