OpenIDE.CodeEngine.Core.Endpoints.EventEndpoint.DispatchThrough C# (CSharp) Method

DispatchThrough() public method

public DispatchThrough ( Action dispatch ) : void
dispatch Action
return void
        public void DispatchThrough(Action<string> dispatch)
        {
            _dispatch = dispatch;
        }

Usage Example

 public CommandEndpoint(string editorKey, ITypeCache cache, EventEndpoint eventEndpoint)
 {
     Logger.Write("Initializing command endpoint using editor key " + editorKey);
     _keyPath = editorKey;
     _cache = cache;
     Logger.Write("Setting up event endpoint");
     _eventEndpoint = eventEndpoint;
     _eventEndpoint.DispatchThrough((m) => {
             handle(new MessageArgs(Guid.Empty, m));
         });
     _server = new TcpServer();
     _server.IncomingMessage += Handle_serverIncomingMessage;
     _server.Start();
     Logger.Write("CodeEngine started listening on port {0}", _server.Port);
     _editor = new Editor();
     Logger.Write("Binding editor RecievedMessage");
     _editor.RecievedMessage += Handle_editorRecievedMessage;
     Logger.Write("Connecting to editor");
     _editor.Connect(_keyPath);
     Logger.Write("Done - Connecting to editor");
 }
All Usage Examples Of OpenIDE.CodeEngine.Core.Endpoints.EventEndpoint::DispatchThrough