vendredi 10 novembre 2023

how to parse a function from a text or excel file

In several apps, i call functions from an excel cell or a text file. example of cells where i call my functions

My issue is : all my functions are written in the same c# class. .cs where all my functions are written

How do i better this architecture ? My functions are parsed, then trigger actions on the world in those fonctions. But I would like to arrange them in many classes, grouped by the type of actions ( time, movement, text etc... ) but have no idea how to write any of this.

I try to be consise because de problem is kind of blurry to me I could't phrase it otherwise. If it implies a whole new architecture, and big changes on the way everything is written, I'm all the more curious !

Thanks !

I tried using MethodInfo and System.Reflection to parse types and function names. but the way my functions are written is to make it the most simple (enable(_item), wait(0), move(right)) so i don't have many info of what type if function i parse.





Aucun commentaire:

Enregistrer un commentaire