コード例 #1
0
ファイル: MessageParser.cs プロジェクト: simongh/Discovery
        private Messages.AliveMessage GetAliveMessage(List<string> lines)
        {
            var result = new Messages.AliveMessage(new Service());

            string tmp = GetValue(lines, Headers.Location);
            if (tmp == null)
                tmp = GetValue(lines, Headers.Location2);
            if (tmp != null)
                result.Service.Location = tmp;

            result.Service.Expiry = GetExpiry(lines);

            return result;
        }
コード例 #2
0
        private Messages.AliveMessage GetAliveMessage(List <string> lines)
        {
            var result = new Messages.AliveMessage(new Service());

            string tmp = GetValue(lines, Headers.Location);

            if (tmp == null)
            {
                tmp = GetValue(lines, Headers.Location2);
            }
            if (tmp != null)
            {
                result.Service.Location = tmp;
            }

            result.Service.Expiry = GetExpiry(lines);

            return(result);
        }