1.4 KiB
1.4 KiB
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. IncludesParameterNodeandMemberBindingNodesupporting types. Recursively models the full expression tree and is JSON-serializable.AcExpressionHelper.cs-- Static facade for serializing/deserializing expressions andIQueryablequery trees. ProvidesExpressionToJson,ExpressionFromJson,QueryToJson, andApplyQueryFromJsonmethods.AcExpressionSerializerVisitor.cs--ExpressionVisitorsubclass that walks an expression tree and builds theAcExpressionNodegraph using a stack-based approach. Handles closure variable evaluation and constant serialization.AcExpressionDeserializer.cs-- ReconstructsExpressiontrees fromAcExpressionNodeDTOs. 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.