Skip to content

[FEATURE]: Add XS Token Expression Provider#79

Merged
MattEdwardsWaggleBee merged 11 commits into
developfrom
feature/78-feature-add-xs-token-expression-provider
May 9, 2025
Merged

[FEATURE]: Add XS Token Expression Provider#79
MattEdwardsWaggleBee merged 11 commits into
developfrom
feature/78-feature-add-xs-token-expression-provider

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 2, 2025

Original issue description

Tell us about your idea

Create a new project so the template can use XS

Anything else?

No response

closes #78

@github-actions github-actions Bot added the feature New feature or request label May 2, 2025
MattEdwardsWaggleBee and others added 2 commits May 2, 2025 12:50
Adds a new expression provider leveraging Hyperbee.XS for template processing.

This allows for more complex and flexible template expressions.

Also includes tests and benchmarks to validate and measure performance.
@MattEdwardsWaggleBee MattEdwardsWaggleBee marked this pull request as ready for review May 2, 2025 17:00
MattEdwardsWaggleBee and others added 8 commits May 2, 2025 16:13
Improves the XS expression compilation process by introducing a TypeResolver and allowing for more flexible expression definitions.

The changes include:
- Injecting a TypeResolver into the XsTokenExpressionProvider for better type management.
- Modifying the MemberDictionaryParseExtension to accept a name, allowing the `vars` keyword to be configurable.
- Updating the compilation logic to use the TypeResolver and configurable `vars` name when parsing expressions.

This refactoring enhances the expressiveness and configurability of the XS templating engine.
Updates the XS token expression compilation process for improved flexibility and extensibility.

- Introduces a `CompileLambda` delegate for customizing lambda compilation.
- Implements a `MemberTypeResolver` to handle member access within expressions, supporting properties, generic methods and indexers on member dictionaries.
- Uses `XsParser` directly for parsing XS expressions.
- Removes dependency on FastExpressionCompiler.
- Updates Hyperbee.XS package version.
Updates the Hyperbee.XS dependency to the stable 1.3.2 version, removing the previous develop release.

This change also adapts a template parser test to use the new
'inject' and 'config' extensions. The test now retrieves a
registered service and a configuration value within the template, demonstrating the functionality of these extensions.
Updates the Hyperbee.XS dependency to version 1.3.3 across the templating provider, benchmark project, and tests.
@MattEdwardsWaggleBee MattEdwardsWaggleBee merged commit a963154 into develop May 9, 2025
4 checks passed
@MattEdwardsWaggleBee MattEdwardsWaggleBee deleted the feature/78-feature-add-xs-token-expression-provider branch May 9, 2025 16:32
MattEdwardsWaggleBee added a commit that referenced this pull request May 9, 2025
* [FEATURE]: Improve template configuration (#76)
* Update nugets

* Update documentation

* Remove orphaned usings and adjust default buffer size

---------

Co-authored-by: Brenton Farmer <brent.farmer@wagglebee.net>

* Previous version was 'v3.0.2'. Version now 'v3.1.0'.

* [FEATURE]: Add XS Token Expression Provider (#79)

* Adds XS expression provider
 - Adds a new expression provider leveraging Hyperbee.XS for template processing.
 - This allows for more complex and flexible template expressions.
 - Also includes tests and benchmarks to validate and measure performance.

* Refactors XS expression compilation for flexibility
  Improves the XS expression compilation process by introducing a TypeResolver and allowing for more flexible expression definitions.
  The changes include:
  - Injecting a TypeResolver into the XsTokenExpressionProvider for better type management.
  - Modifying the MemberDictionaryParseExtension to accept a name, allowing the `vars` keyword to be configurable.
  - Updating the compilation logic to use the TypeResolver and configurable `vars` name when parsing expressions.

Updates the XS token expression compilation process for improved flexibility and extensibility.

- Introduces a `CompileLambda` delegate for customizing lambda compilation.
- Implements a `MemberTypeResolver` to handle member access within expressions, supporting properties, generic methods and indexers on member dictionaries.
- Uses `XsParser` directly for parsing XS expressions.
- Removes dependency on FastExpressionCompiler.
- Updates Hyperbee.XS package version.

This change also adapts a template parser test to use the new 'inject' and 'config' extensions. The test now retrieves a registered service and a configuration value within the template, demonstrating the functionality of these extensions.

Updates the Hyperbee.XS dependency to version 1.3.3 across the templating provider, benchmark project, and tests.

---------

Co-authored-by: Matt Edwards <matthew.edwards@wagglebee.net>

* Previous version was 'v3.1.1'. Version now 'v3.2.0'.

---------

Co-authored-by: annette.findley <annette.varndell@wagglebee.net>
Co-authored-by: Brenton Farmer <brent.farmer@wagglebee.net>
Co-authored-by: MattEdwardsWaggleBee <MattEdwardsWaggleBee@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant