asulwer / RulesEngine

Rules Engine with extensive Dynamic expression support
MIT License
6 stars 1 forks source link

Introduce IDemo Interface and Automatic Execution in Program Class and code clean up in demo project #34

Closed RenanCarlosPereira closed 4 days ago

RenanCarlosPereira commented 5 days ago

Overview

This PR introduces a new IDemo interface and updates the Program class to automatically discover and execute all classes that implement this interface. Additionally, CodeMaid and ReSharper have been used in demo project to format the codebase, ensuring consistency and adherence to coding standards.

Changes Introduced

  1. IDemo Interface

    • Introduced IDemo interface with a Run method that takes an optional CancellationToken.
      public interface IDemo
      {
      Task Run(CancellationToken cancellationToken = default);
      }
  2. Program Class Update

    • Updated the Program class to use reflection for discovering and executing all implementations of the IDemo interface.
  3. Code Formatting

    • Applied CodeMaid and ReSharper for code formatting. This includes organizing namespaces, formatting code, and removing unused references to ensure the codebase is clean and adheres to our coding standards.

Testing

How to Test

  1. Run the project.
  2. Verify that the console outputs indicate successful discovery and execution of the Run methods of all classes implementing IDemo.
  3. Check the elapsed time output to ensure the stopwatch functionality is working as expected.
RenanCarlosPereira commented 4 days ago

man, you merged that with conflicts from the other PR.

will open another one 😥

asulwer commented 4 days ago

where is the IDemo interface?

RenanCarlosPereira commented 4 days ago

you completed this PR with merge conflicts, we should not do it... before merging a PR you need to verify if the build is passing.

fixing it now, give me a sec.

asulwer commented 4 days ago

the merge conflicts were formatting issues. i reviewed each file and saw no reason not to resolve the conflict. what wasnt included and is causing the build issue is the missing IDemo interface. that was not included in this PR.

RenanCarlosPereira commented 4 days ago

it was there, maybe when you resolved the conflicts it got removed. 😄 created another PR there #35

asulwer commented 4 days ago

i see it under program.cs. shouldn't it be in its own file?