internal RemoteControlServer(int port) // For debugging we will use special port, not random one { _protectionKey = System.Guid.NewGuid().ToString(); _port = port; // Remote control is disabled if (-1 == _port) { return; } _formatters = new Hashtable(); _formatters.Add("xml", new CreateFormatter(XmlOutputFormatter.CreateFormatter)); _defaultFormatter = new CreateFormatter(XmlOutputFormatter.CreateFormatter); _calls = new Hashtable(); AddRemoteCall("System.ListAllMethods", new ListAllMethodsDelegate(listAllMethods)); _onAccept = new WaitCallback(onAccept); }
protected virtual void OnCreateFormatter(List <FormatterInfo> e) { CreateFormatter?.Invoke(this, e); }