-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Important Notes I'm always looking to improve my open-source library. If you've encountered any issues, limitations, or have suggestions for new features, please don't hesitate to share your thoughts. Your feedback is invaluable in helping me make this library even better.
NeonBlue.Expressions is a .NET 8.0 C# library designed to efficiently evaluate expressions. It offers a streamlined solution for .NET developers seeking to avoid the overhead of traditional expression evaluation methods. Existing expression evaluation libraries often introduce inefficiencies by relying on intermediaries such as JavaScript engines or .NET expression trees. These layers add processing overhead, making them less optimal for performance-critical applications.
NeonBlue.Expressions is designed to overcome these limitations with a streamlined, interpreter-based approach that eliminates unnecessary overhead. By directly interpreting expressions, it ensures faster evaluation and reduced complexity, making it a powerful choice for scenarios where performance is key.
Another common challenge with traditional expression evaluators is their handling of aggregate functions over large datasets. Many libraries process arrays or lists by iterating over each element individually, leading to bottlenecks and slower performance. NeonBlue.Expressions is optimized for efficient aggregation, offering high performance even when working with substantial data sets.
By addressing these limitations, NeonBlue.Expressions provides developers with a faster, more efficient tool that’s ideal for high-demand environments, from business applications to scientific calculations.
- Direct Interpretation: NeonBlue.Expressions's interpreter directly executes expressions, minimizing computational overhead.
- Efficient Aggregate Functions: NeonBlue.Expressions's optimized aggregation technique significantly improves performance when working with large datasets.
- Lightweight and Fast: Designed for performance, NeonBlue.Expressions is optimized for efficient expression evaluation.
- .NET 8 Compatibility: Built on the latest .NET framework, ensuring compatibility and access to modern features.
- Ease of Use: A straightforward API simplifies integration into .NET applications.
NeonBlue.Expressions is a versatile library that can be applied in many different scenarios, including:
- Business Rules: Implement dynamic decision-making logic based on custom conditions.
- Formulas and Calculations: Evaluate complex formulas within applications, much like a spreadsheet.
- Data Manipulation: Transform and calculate data using user-defined rules.
- Pivot Tables: Create dynamic summaries and reports from large datasets, ideal for business intelligence.
- Scripting Languages: Add customizable expression evaluation to your automation scripts or applications.
- Domain-Specific Languages (DSLs): Define specialized languages for specific fields like finance or scientific modeling.
- Mathematical Equations: Evaluate advanced mathematical expressions, including statistical and trigonometric functions.
- Scientific Simulations: Handle physics formulas, engineering calculations, and data analysis efficiently.
- Data Visualization: Generate dynamic charts and graphs with values calculated from user-defined expressions.
NeonBlue.Expressions is designed with flexibility and ease of use in mind, offering a rich syntax that closely resembles Excel expressions. This makes it intuitive for users who are familiar with spreadsheet tools while providing the performance and versatility developers need in business applications.
- Operators: The library provides support for a wide range of operators, making it suitable for complex evaluations.
- Built-in Functions: NeonBlue.Expressions comes packed with numerous built-in functions that cover a broad spectrum of use cases. These functions allow users to craft expressions for a variety of business and scientific needs.
- String Literals: Strings can be enclosed in single quotes (') directly within the expression, e.g., 'Hello World'.
- Date Literals: Dates can be input by wrapping them in # symbols, e.g., #2023-09-24#, making it easy to integrate date operations within expressions.
- Boolean values: Boolean values can be directly handled using the keywords true and false.
- Mathematical Constants Pi(π): The constant Pi is readily available for use in mathematical calculations, providing accurate circular and trigonometric operations.
- Mathematical Constants Tau (τ): The constant Tau (2π) is also included for those who prefer this alternative, offering flexibility in mathematical expressions.
- Custom Functions: In addition to built-in functions, users can define their own custom functions and extend the library’s capabilities, making it an excellent choice for applications requiring a high degree of customization.
NuGet:
- Open your Visual Studio project.
- Right-click on the project and select "Manage NuGet Packages."
- Search for "NeonBlue.Expressions" and install the package.
Alternatively:
- Download the library's NuGet package from the official repository.
- Add the package to your project using the Package Manager Console or by manually adding a reference.
- Install using CLI.
dotnet add package NeonBlue.ExpressionsLicense
NeonBlue.Expressions is licensed under the MIT License and the Apache License, Version 2.0 (the "Licenses"). You may obtain a copy of the MIT License at https://opensource.org/license/mit and the Apache License, Version 2.0 at https://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.