Skip to content

Feature : Alias Map #58

Closed
Closed

Description

@pksorensen

We based alot of functions of Power Automate, which makes sense. But generally writing my expressions i write eq() as a shorthand for equal.

Would properly be good to be able to just rename or alias functions in a project without having to implement it again.

I suggest we implement a service that can registered to map one function name to another.

Activity

  1. thygesteffensen commented on Dec 10, 2021

    @thygesteffensen
    Member

    Good idea 💡 and not against, we just have to keep it true with Power Automate, since it is the core base - but we should still allow other use cases to be easy.

    This could be combined with #47 to replace the current way functions are registered and 'retrieved', added a metadata class with shorthands, i.e. eq => equal, could be a good solution.

    The use of shorthands should be controlled as an option, so it can be disregarded, and an error can be thrown, if ExpressionEngine is being used to test Power Automate flows.

    I don't think we should bloat the current way functions are registered and retrieved, but instead recreate it properly :D

  2. pksorensen commented on Dec 10, 2021

    @pksorensen
    MemberAuthor

    We agree,

    i am thinking

    var services = new ServiceCollection();
    services.addExpressionEngine();
    
    services.AddFunctionMap<MyFunctionMap>();
    
    ----
    
    class MyFunctionMap : IFunctionMapper
    {
    
           public string ResolveFunctionName(string name){
                      //logic to map names
           }
    
    }
    
    class DefaultFunctionMap : IFunctionMapper
    {
     public string ResolveFunctionName(string name) => name;
    }
    

    Would be a none breaking feature but provide a way to do it.

  3. added a commit that references this issue on Feb 28, 2022
    526a434
  4. github-actions commented on Mar 18, 2022

    @github-actions

    🎉 This issue has been resolved in version 4.0.0-dev.2 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  5. moved this to Todo in EAVFWon Mar 30, 2022
  6. Repository owner moved this from Todo to Done in EAVFWon May 25, 2022
  7. github-actions commented on Aug 23, 2022

    @github-actions

    🎉 This issue has been resolved in version 4.0.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions