Ejemplo n.º 1
0
        public bool TryParseNodeInfo(out ElasticsearchNodeInfo nodeInfo)
        {
            nodeInfo = null;
            if (this.Section != "node")
            {
                return(false);
            }

            var match = InfoParser.Match(this.Message);

            if (!match.Success)
            {
                return(false);
            }

            var version = match.Groups["version"].Value.Trim();
            var pid     = match.Groups["pid"].Value.Trim();
            var build   = match.Groups["build"].Value.Trim();

            nodeInfo = new ElasticsearchNodeInfo(version, pid, build);
            return(true);
        }
		public bool TryParseNodeInfo(out ElasticsearchNodeInfo nodeInfo)
		{
			nodeInfo = null;
			if (this.Section != "node") return false;

			var match = InfoParser.Match(this.Message);
			if (!match.Success) return false;

			var version = match.Groups["version"].Value.Trim();
			var pid = match.Groups["pid"].Value.Trim();
			var build = match.Groups["build"].Value.Trim();
			nodeInfo = new ElasticsearchNodeInfo(version, pid, build);
			return true;
		}