OpenIDE.Core.CodeEngineIntegration.Instance.Query C# (CSharp) 메소드

Query() 공개 메소드

public Query ( string command ) : string
command string
리턴 string
        public string Query(string command)
        {
            if (_client == null) {
                _client = _clientFactory.Invoke();
                _client.Connect(Port, (s) => {});
                if (!_client.IsConnected)
                    return "";
            }
            var reply = _client.Request(command);
            if (!_keepClientAlive) {
                _client.Disconnect();
                _client = null;
            }
            return reply;
        }

Usage Example

 protected override void run(Instance instance, string args)
 {
     Console.WriteLine(instance.Query(_name+" "+args));
 }