Skip to content

Add helper method to register multiple local callbacks #29

@tupini07

Description

@tupini07

In many cases, we want to register multiple events, each with its own callback. Currently, we need to do a call to RegisterLocal for each pair we want to register.

An easier way that would allow us to avoid repetition would be to add a method that receives an array of pairs and calls RegisterLocal. For example, we could implement it as an overload of the RegisterLocal:

RegisterLocal(List<Pair<string, callback>> items) {
  foreach (event, callback) in items {
    RegisterLocal(event, callback)
  }
}

As an idea, we could also implement a similar method to register multiple local reply callbacks (we should wait for #28 to be closed in that case).

As a note: we could replace the current RegisterLocal with this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions