AyCode.Blazor/AyCode.Blazor.Components/Services/ExpressionHelpers
Loretta b80b117a38 Update docs: enforce .md sync, clarify structure & TFMs
Expanded and clarified solution/project documentation:
- Added all top-level docs and docs/ folder as solution items in .sln files
- Inserted maintenance notices in all project and subfolder READMEs: require .md sync with code
- Main READMEs now include project tables with TFM, purpose, and README links
- ARCHITECTURE.md now details dependency graph and TFM rationale
- CONVENTIONS.md and copilot-instructions.md require code reuse, no redundancy
- Glossary and conventions updated to require terminology/rule updates with code changes
- Emphasized DLL-only AyCode.Core refs and nopCommerce .NET 9.0 requirement
- Clarified domain terms and intentional typos
- No code logic changes; documentation and guidance only
2026-03-29 09:26:15 +02:00
..
AcExpressionDeserializer.cs Add LINQ Expression JSON serialization & SignalR grid source 2025-12-30 19:29:50 +01:00
AcExpressionHelper.cs Add LINQ Expression JSON serialization & SignalR grid source 2025-12-30 19:29:50 +01:00
AcExpressionNode.cs Add LINQ Expression JSON serialization & SignalR grid source 2025-12-30 19:29:50 +01:00
AcExpressionSerializerVisitor.cs Add LINQ Expression JSON serialization & SignalR grid source 2025-12-30 19:29:50 +01:00
README.md Update docs: enforce .md sync, clarify structure & TFMs 2026-03-29 09:26:15 +02:00

README.md

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.