Skip to content

ApiEventManager Rework#918

@softworkz

Description

@softworkz

Figured out the problem

internalstaticvoidAddEvent(stringeventName,objectid,Actioncallback,Actionvalue){varcall=(Action)events.GetOrAdd(eventName,callback);if(call==null){BridgeConnector.Socket.On(eventName+id,()=>{((Action)events[eventName])();});BridgeConnector.Socket.Emit($"register-{eventName}",id);}call+=value;events[eventName]=call;}

@softworkz could you advise whether it requires any locks and if so where.

Originally posted by @agracio in #913 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions